1 2017-10-01 Alan Modra <amodra@gmail.com>
4 * dwarf2.c (read_section): Allocate buffer with extra byte for
5 bfd_simple_get_relocated_section_contents rather than copying
8 2017-09-29 Alan Modra <amodra@gmail.com>
10 * merge.c (merge_strings): Return FALSE on malloc failure.
11 (_bfd_merge_sections): Return failures from record_section and
14 2017-09-28 Alan Modra <amodra@gmail.com>
17 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
18 a case where plugin_notice isn't called.
20 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
25 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
28 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
29 output_bfd to info->callbacks->minfo.
31 2017-09-26 Nick Clifton <nickc@redhat.com>
34 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
35 assertion failure if elf_x86_64_rtype_to_howto has already issued
38 2017-09-26 Alan Modra <amodra@gmail.com>
41 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
44 2017-09-26 Nick Clifton <nickc@redhat.com>
47 * dwarf2.c (read_formatted_entries): Fail early if we know that
48 the loop parsing data entries will overflow the end of the
51 2017-09-26 Alan Modra <amodra@gmail.com>
54 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
55 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
56 to stash->info_ptr_memory, and check die_ref is within that memory.
57 Set info_ptr_end correctly when another CU is refd. Check die_ref
58 for DW_FORM_ref4 etc. is within CU.
60 2017-09-26 Alan Modra <amodra@gmail.com>
63 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
64 (read_formatted_entries): Init "fe".
65 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
67 2017-09-26 Alan Modra <amodra@gmail.com>
70 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
73 2017-09-25 Alan Modra <amodra@gmail.com>
76 * dwarf1.c (parse_die): Sanity check pointer against section limit
78 (parse_line_table): Likewise.
80 2017-09-25 Alan Modra <amodra@gmail.com>
83 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
85 (parse_comp_unit): Likewise.
87 2017-09-25 Alan Modra <amodra@gmail.com>
90 * dwarf2.c (read_formatted_entries): Error on format_count zero.
92 2017-09-24 Alan Modra <amodra@gmail.com>
95 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
96 within section bounds.
98 2017-09-24 Alan Modra <amodra@gmail.com>
101 * dwarf2.c (decode_line_info): Properly free line sequences on error.
103 2017-09-24 Alan Modra <amodra@gmail.com>
106 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
107 pname param. Return status. Make name const. Don't abort,
108 return an error. Formatting. Exit if current info_ptr matches
109 orig_info_ptr. Update callers.
110 (scan_unit_for_symbols): Start at nesting_level of zero. Make
111 nested_funcs an array of structs for extensibility. Formatting.
113 2017-09-24 Alan Modra <amodra@gmail.com>
116 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
117 rather than dividing by zero.
119 2017-09-24 Alan Modra <amodra@gmail.com>
122 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
124 2017-09-24 Alan Modra <amodra@gmail.com>
127 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
129 2017-09-24 Alan Modra <amodra@gmail.com>
132 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
133 SHT_GNU_verneed section for sanity. Don't zalloc memory for
136 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
139 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
142 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
145 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
146 -1 if bfd_canonicalize_dynamic_reloc returns 0.
148 2017-09-22 Pedro Alves <palves@redhat.com>
149 Alan Modra <amodra@gmail.com>
151 * version.h: Add comment.
153 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
155 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
156 NT_S390_GS_BC, correct the previously swapped invocations of
157 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
159 2017-09-19 Alan Modra <amodra@gmail.com>
162 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
165 2017-09-19 Alan Modra <amodra@gmail.com>
168 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
169 symbols before calculating verrefs. Don't renumber dynsyms
170 after gc. Exclude .gnu.version when zero or one dynsym.
171 Localize some vars and reindent.
173 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
176 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
177 return from bfd_canonicalize_dynamic_reloc.
179 2017-09-15 Alan Modra <amodra@gmail.com>
182 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
183 overflows bfd_size_type.
185 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
188 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
189 to indicate if conversion is performed.
190 (elf_i386_check_relocs): Cache section contents and relocations
191 if conversion is performed.
192 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
193 contents and relocations if conversion is performed.
195 2017-09-14 Nick Clifton <nickc@redhat.com>
198 * peXXigen.c (pe_print_idata): Extend check for HintName vector
201 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
203 * elfxx-x86.h: Fix a typo in comments.
205 2017-09-09 Kamil Rytarowski <n54@gmx.com>
207 * elf32-nds32.c: Rename __BIT() to N32_BIT().
209 2017-09-09 Alan Modra <amodra@gmail.com>
211 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
214 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
216 * elf32-i386.c (elf_i386_relocate_section): Update usage of
217 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
218 (elf_i386_finish_dynamic_symbol): Likewise.
219 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
220 (elf_x86_64_finish_dynamic_symbol): Likewise.
221 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
222 (_bfd_x86_elf_fixup_symbol): Likewise.
224 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
226 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
227 check has_non_got_reloc.
229 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
232 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
233 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
234 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
235 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
236 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
237 and linker_def on __ehdr_start if it is referenced and not
239 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
240 and return TRUE when building executable, if a symbol has
241 non-GOT/non-PLT relocations in text section or there is no
243 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
245 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
247 * elfxx-x86.h: Update comments.
249 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
251 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
252 elf_x86_plt_layout_table with elf_x86_init_table.
253 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
255 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
257 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
258 (elf_x86_init_table): This.
259 (_bfd_x86_elf_link_setup_gnu_properties): Replace
260 elf_x86_plt_layout_table with elf_x86_init_table.
262 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
264 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
265 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
266 * configure: Regenerated.
267 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
268 and r_sym fields of plt_layout.
269 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
271 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
272 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
273 r_info nor r_sym fields.
274 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
276 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
278 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
280 * (_bfd_riscv_relax_align): Call bfd_set_error and
281 print an error message when unable to relax a .align directive.
283 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
285 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
286 (riscv_record_pcrel_hi_reloc): Add absolute argument.
287 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
288 R_RISCV_PCREL_HI20 relocs, and pass the result to
289 riscv_record_pcrel_hi_reloc.
291 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
293 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
294 r_type_p. Remove the converted argument. Replace
295 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
296 the new relocation type via r_type_p.
297 (elf_i386_relocate_section): Likewise.
298 (elf_i386_finish_dynamic_symbol): Likewise.
299 (need_convert_load): Removed.
300 (check_relocs_failed): Updated.
301 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
302 instead of setting need_convert_load.
303 (_bfd_i386_elf_convert_load): Removed.
304 * elf64-x86-64.c (need_convert_load): Removed.
305 (check_relocs_failed): Updated.
306 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
307 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
308 Return the new relocation type via r_type_p.
309 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
310 instead of setting need_convert_load.
311 (elf_x86_64_check_relocs): Don't check PIC if relocation has
313 (_bfd_x86_64_elf_convert_load): Removed.
314 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
315 with SYMBOL_REFERENCES_LOCAL_P.
316 (elf_x86_64_finish_dynamic_symbol): Likewise.
317 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
319 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
320 (_bfd_x86_elf_link_symbol_references_local): New function.
321 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
322 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
323 SYMBOL_REFERENCES_LOCAL_P.
324 (elf_x86_link_hash_entry): Add local_ref.
325 (elf_x86_link_hash_table): Remove convert_load.
326 (_bfd_i386_elf_convert_load): Removed.
327 (_bfd_x86_64_elf_convert_load): Likewise.
328 (_bfd_x86_elf_link_symbol_references_local): New.
330 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
332 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
333 (elf_x86_64_info_to_howto): Get the real relocation type by
334 masking out R_X86_64_converted_reloc_bit.
335 (elf_x86_64_check_tls_transition): Get the real relocation type
336 by masking out R_X86_64_converted_reloc_bit.
337 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
338 instead of setting converted_reloc.
339 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
340 instead of converted_reloc. Get the real relocation type by
341 masking out R_X86_64_converted_reloc_bit.
342 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
343 R_X86_64_converted_reloc_bit is valid.
344 * elfxx-x86.h (converted_reloc): Removed.
346 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
348 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
349 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
350 to get the relocation type again.
351 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
352 r_type when calling elf_x86_64_tls_transition. Don't use
353 ELF32_R_TYPE to get the relocation type again.
355 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
357 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
360 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
362 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
363 argument. Don't check relocation overflow. Avoid relocation
364 overflow if --no-relax is used. Set converted_reloc on symbol
365 if a GOTPCREL relocation is converted.
366 (elf_x86_64_relocate_section): Issue a fatal error and suggest
367 --no-relax if GOTPCREL relocation conversion leads to relocation
369 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
371 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
372 Edmar Wienskoski <edmar.wienskoski@nxp.com
374 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
375 (ppc_elf_check_relocs): Handle it.
376 (ppc_elf_vle_split20): New function.
377 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
379 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
382 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
383 for x86-64 if GOT_TLS_GDESC_P is true.
385 2017-09-03 Alan Modra <amodra@gmail.com>
388 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
390 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
392 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
393 tls_get_addr for x86-64 in one place.
395 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
397 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
398 with elfxx-x86.lo for 64-bit BFD.
399 * configure: Regenerated.
401 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
403 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
404 (_bfd_i386_elf_convert_load): This. Remove static.
405 (elf_i386_size_dynamic_sections): Removed.
406 (elf_backend_size_dynamic_sections): Likewise.
407 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
408 (_bfd_x86_64_elf_convert_load): This. Remove static.
409 (elf_x86_64_size_dynamic_sections): Removed.
410 (elf_backend_size_dynamic_sections): Likewise.
411 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
412 (elf_x86_allocate_dynrelocs): This. Make it static.
413 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
414 (elf_x86_allocate_local_dynreloc): This. Make it static.
415 (elf_i386_is_reloc_section): New function.
416 (elf_x86_64_is_reloc_section): Likewise.
417 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
418 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
419 Rearrange got_entry_size initialization.
420 (_bfd_x86_elf_size_dynamic_sections): New function.
421 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
422 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
423 (_bfd_i386_elf_convert_load): New.
424 (_bfd_x86_64_elf_convert_load): Likewise.
425 (_bfd_x86_elf_size_dynamic_sections): Likewise.
426 (elf_backend_size_dynamic_sections): Likewise.
427 (_bfd_x86_elf_allocate_dynrelocs): Removed.
428 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
430 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
432 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
435 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
437 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
438 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
440 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
442 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
443 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
444 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
445 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
446 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
447 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
449 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
451 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
452 (elf_i386_allocate_local_dynrelocs): Likewise.
453 (elf_i386_size_dynamic_sections): Replace
454 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
455 with _bfd_x86_elf_allocate_dynrelocs and
456 _bfd_x86_elf_allocate_local_dynrelocs.
457 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
458 (elf_x86_64_allocate_local_dynrelocs): Likewise.
459 (elf_x86_64_size_dynamic_sections): Replace
460 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
461 with _bfd_x86_elf_allocate_dynrelocs and
462 _bfd_x86_elf_allocate_local_dynrelocs.
463 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
464 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
465 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
466 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
468 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
470 * elf32-i386.c (is_i386_elf): Removed.
471 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
472 (elf_i386_size_dynamic_sections): Likewise.
473 (elf_i386_relocate_section): Likewise.
474 * elf64-x86-64.c (is_x86_64_elf): Removed.
475 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
477 (elf_x86_64_size_dynamic_sections): Likewise.
478 (elf_x86_64_relocate_section): Likewise.
479 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
481 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
484 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
486 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
487 (elf_i386_allocate_dynrelocs): Replace
488 elf_i386_compute_jump_table_size with
489 elf_x86_compute_jump_table_size.
490 (elf_i386_size_dynamic_sections): Likewise.
491 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
492 (elf_x86_64_allocate_dynrelocs): Replace
493 elf_x86_64_compute_jump_table_size with
494 elf_x86_compute_jump_table_size.
495 (elf_x86_64_size_dynamic_sections): Likewise.
496 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
498 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
499 (elf_x86_compute_jump_table_size): New.
501 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
503 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
505 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
506 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
508 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
510 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
511 with htab->is_vxworks.
512 (elf_i386_size_dynamic_sections): Likewise.
513 (elf_i386_relocate_section): Likewise.
514 (elf_i386_finish_dynamic_symbol): Likewise.
515 (elf_i386_finish_dynamic_sections): Likewise.
517 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
519 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
520 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
521 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
522 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
523 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
524 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
525 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
526 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
528 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
531 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
532 ELF_COMMON_DEF_P for common symbols.
534 2017-09-02 Alan Modra <amodra@gmail.com>
536 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
537 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
538 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
540 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
542 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
543 (elf_backend_gc_mark_hook): Likewise.
544 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
545 (elf_backend_gc_mark_hook): Likewise.
546 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
547 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
548 (elf_backend_gc_mark_hook): Likewise.
550 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
552 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
553 (elf_backend_adjust_dynamic_symbol): Likewise.
554 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
555 (elf_backend_adjust_dynamic_symbol): Likewise.
556 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
557 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
558 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
559 (_bfd_x86_elf_adjust_dynamic_symbol): New.
560 (elf_backend_adjust_dynamic_symbol): Likewise.
562 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
564 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
567 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
569 * elf32-i386.c (elf_i386_mkobject): Removed.
570 (bfd_elf32_mkobject): Likewise.
571 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
572 (bfd_elf64_mkobject): Likewise.
573 (bfd_elf32_mkobject): Likewise.
574 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
575 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
576 (bfd_elf64_mkobject): Likewise.
577 (bfd_elf32_mkobject): Likewise.
579 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
581 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
582 Call _bfd_x86_elf_link_setup_gnu_properties.
583 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
584 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
586 (elf_x86_64_non_lazy_plt): Likewise.
587 (elf_x86_64_lazy_bnd_plt): Likewise.
588 (elf_x86_64_non_lazy_bnd_plt): Likewise.
589 (elf_x86_64_lazy_ibt_plt): Likewise.
590 (elf_x32_lazy_ibt_plt): Likewise.
591 (elf_x86_64_non_lazy_ibt_plt): Likewise.
592 (elf_x32_non_lazy_ibt_plt): Likewise.
593 (elf_x86_64_nacl_plt): Likewise.
594 (elf_x86_64_link_setup_gnu_properties): Updated. Call
595 _bfd_x86_elf_link_setup_gnu_properties.
596 * elfxx-x86.c: Include elf-vxworks.h".
597 (_bfd_x86_elf_link_setup_gnu_properties): New function.
598 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
599 comments for pic_plt0_entry and pic_plt_entry.
600 (elf_x86_non_lazy_plt_layout): Likewise.
601 (elf_x86_plt_layout_table): New.
602 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
604 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
607 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
608 .eh_frame section for the second PLT.
609 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
610 alignment of .eh_frame section for the second PLT.
612 2017-09-01 Nick Clifton <nickc@redhat.com>
615 * dwarf2.c (decode_line_info): Fix test for an overlong line info
618 2017-09-01 Nick Clifton <nickc@redhat.com>
621 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
622 attribute buffer is NUL terminated.
624 2017-08-31 Nick Clifton <nickc@redhat.com>
627 * dwarf2.c (read_section): If necessary add a terminating NUL byte
628 to dwarf string sections.
630 2017-08-31 Alan Modra <amodra@gmail.com>
632 * po/SRC-POTFILES.in: Regenerate.
634 2017-08-31 Alan Modra <amodra@gmail.com>
636 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
637 for a section containing just a terminator. Allow multiple
638 terminators at end of section.
639 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
640 sections when not adding alignment. Assert on terminator in
643 2017-08-31 Alan Modra <amodra@gmail.com>
647 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
650 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
652 * configure.ac (bfd_backends): Add elf64.lo together with
653 elfxx-x86.lo for 64-bit BFD.
654 * configure: Regenerated.
656 2017-08-31 James Bowman <james.bowman@ftdichip.com>
658 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
661 2017-08-31 Alan Modra <amodra@gmail.com>
664 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
665 before _close_and_cleanup. Call iovec->bclose after.
666 (bfd_close): Remove code common to, and call, bfd_close_all_done.
668 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
670 * elf32-i386.c (elf_i386_plt_type): Removed.
671 (elf_i386_plt): Likewise.
672 (elf_i386_get_synthetic_symtab): Updated. Call
673 _bfd_x86_elf_get_synthetic_symtab.
674 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
675 (elf_x86_64_plt): Likewise.
676 (elf_x86_64_get_synthetic_symtab): Updated. Call
677 _bfd_x86_elf_get_synthetic_symtab.
678 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
679 (elf_x86_64_get_plt_got_vma): Likewise.
680 (elf_i386_valid_plt_reloc_p): Likewise.
681 (elf_x86_64_valid_plt_reloc_p): Likewise.
682 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
683 * elfxx-x86.h (elf_x86_plt_type): New.
684 (elf_x86_plt): Likewise.
685 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
687 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
689 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
690 target_id instead of elf_machine_code.
692 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
694 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
695 (elf_i386_lazy_plt_layout): Likewise.
696 (elf_i386_non_lazy_plt_layout): Likewise.
697 (elf_i386_plt_layout): Likewise.
698 (elf_i386_link_hash_table): Likewise.
699 (elf_i386_next_tls_desc_index): Likewise.
700 (elf_i386_srelplt2): Likewise.
701 (elf_i386_plt): Likewise.
702 (elf_i386_lazy_plt): Likewise.
703 (elf_i386_non_lazy_plt): Likewise.
704 (elf_i386_link_hash_table_create): Likewise.
705 (bfd_elf32_bfd_link_hash_table_create): Likewise.
706 (elf_i386_lazy_plt): Updated.
707 (elf_i386_non_lazy_plt): Likewise.
708 (elf_i386_lazy_ibt_plt): Likewise.
709 (elf_i386_non_lazy_ibt_plt): Likewise.
710 (elf_i386_allocate_dynrelocs): Likewise.
711 (elf_i386_size_dynamic_sections): Likewise.
712 (elf_i386_relocate_section): Likewise.
713 (elf_i386_finish_dynamic_symbol): Likewise.
714 (elf_i386_finish_dynamic_sections): Likewise.
715 (elf_i386_get_synthetic_symtab): Likewise.
716 (elf_i386_link_setup_gnu_properties): Likewise.
717 (elf_i386_nacl_plt): Likewise.
718 * elf64-x86-64.c (ABI_64_P): Removed.
719 (ELF64_DYNAMIC_INTERPRETER): Likewise.
720 (ELF32_DYNAMIC_INTERPRETER): Likewise.
721 (elf_x86_64_lazy_plt_layout): Likewise.
722 (elf_x86_64_non_lazy_plt_layout): Likewise.
723 (elf_x86_64_plt_layout): Likewise.
724 (elf_x86_64_link_hash_table): Likewise.
725 (elf_x86_64_plt): Likewise.
726 (elf_x86_64_lazy_plt): Likewise.
727 (elf_x86_64_non_lazy_plt): Likewise.
728 (elf_x86_64_link_hash_table_create): Likewise.
729 (bfd_elf64_bfd_link_hash_table_create): Likewise.
730 (bfd_elf32_bfd_link_hash_table_create): Likewise.
731 (elf_x86_64_lazy_plt): Updated.
732 (elf_x86_64_non_lazy_plt): Likewise.
733 (elf_x86_64_lazy_bnd_plt): Likewise.
734 (elf_x86_64_non_lazy_bnd_plt): Likewise.
735 (elf_x86_64_lazy_ibt_plt): Likewise.
736 (elf_x32_lazy_ibt_plt): Likewise.
737 (elf_x86_64_non_lazy_ibt_plt): Likewise.
738 (elf_x32_non_lazy_ibt_plt): Likewise.
739 (elf_x86_64_allocate_dynrelocs): Likewise.
740 (elf_x86_64_size_dynamic_sections): Likewise.
741 (elf_x86_64_relocate_section): Likewise.
742 (elf_x86_64_finish_dynamic_symbol): Likewise.
743 (elf_x86_64_finish_dynamic_sections): Likewise.
744 (elf_x86_64_get_synthetic_symtab): Likewise.
745 (elf_x86_64_link_setup_gnu_properties): Likewise.
746 (elf_x86_64_nacl_plt): Likewise.
747 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
749 (ELF32_DYNAMIC_INTERPRETER): New.
750 (ELF64_DYNAMIC_INTERPRETER): Likewise.
751 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
752 (_bfd_x86_elf_link_hash_table_create): Likewise.
753 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
754 (elf_x86_link_hash_table_free): This. Make it static.
755 * elfxx-x86.h: Don't include "objalloc.h".
757 (elf_x86_lazy_plt_layout): Likewise.
758 (elf_x86_non_lazy_plt_layout): Likewise.
759 (elf_x86_plt_layout): Likewise.
760 (_bfd_x86_elf_link_hash_table_create): Likewise.
761 (bfd_elf64_bfd_link_hash_table_create): Likewise.
762 (bfd_elf32_bfd_link_hash_table_create): Likewise.
763 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
764 srelplt2 and next_tls_desc_index.
765 (_bfd_x86_elf_link_hash_table_free): Removed.
767 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
769 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
770 branch offset interpretation.
772 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
775 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
777 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
779 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
780 (elf_x86_64_srelplt2): Likewise.
782 2017-08-30 Alan Modra <amodra@gmail.com>
784 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
785 (ppc64_elf_tls_optimize): Set it.
786 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
787 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
788 addis would add zero.
789 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
790 (ppc_elf_tls_optimize): Set it.
791 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
792 insn on TPREL16_LO relocs to use r2 when addis would add zero.
794 2017-08-30 Alan Modra <amodra@gmail.com>
796 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
797 __tls_get_addr call sequences to LE, don't move the addi down
798 to the nop. Replace the bl with addi and leave the nop alone.
800 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
802 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
804 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
806 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
808 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
810 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
811 (BFD64_BACKENDS): Likewise.
812 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
813 (BFD64_BACKENDS_CFILES): Likewise.
814 * Makefile.in: Regenerated.
815 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
816 elf32-i386.lo and elf64-x86-64.lo.
817 * configure: Regenerated.
818 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
819 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
820 "objalloc.h" and "hashtab.h".
821 (ELIMINATE_COPY_RELOCS): Removed.
822 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
823 (SYMBOL_NO_COPYRELOC): Likewise.
824 (elf_i386_link_hash_entry): Likewise.
825 (GOT_UNKNOWN): Likewise.
826 (GOT_NORMAL): Likewise.
827 (GOT_TLS_GD): Likewise.
828 (elf_i386_hash_entry): Likewise.
829 (elf_i386_obj_tdata): Likewise.
830 (elf_i386_tdata): Likewise.
831 (elf_i386_local_got_tls_type): Likewise.
832 (elf_i386_local_tlsdesc_gotent): Likewise.
833 (elf_i386_hash_table): Likewise.
834 (elf_i386_link_hash_newfunc): Likewise.
835 (elf_i386_local_htab_hash): Likewise.
836 (elf_i386_local_htab_eq): Likewise.
837 (elf_i386_get_local_sym_hash): Likewise.
838 (elf_i386_link_hash_table_free): Likewise.
839 (elf_i386_copy_indirect_symbol): Likewise.
840 (elf_i386_fixup_symbol): Likewise.
841 (elf_i386_readonly_dynrelocs): Likewise.
842 (elf_i386_always_size_sections): Likewise.
843 (elf_i386_set_tls_module_base): Likewise.
844 (elf_i386_dtpoff_base): Likewise.
845 (compare_relocs): Likewise.
846 (elf_i386_hash_symbol): Likewise.
847 (elf_i386_parse_gnu_properties): Likewise.
848 (elf_i386_merge_gnu_properties): Likewise.
849 (elf_i386_link_check_relocs): Likewise.
850 (elf_i386_merge_symbol_attribute): Likewise.
851 (bfd_elf32_bfd_link_check_relocs): Likewise.
852 (elf_backend_copy_indirect_symbol): Likewise.
853 (elf_backend_always_size_sections): Likewise.
854 (elf_backend_omit_section_dynsym): Likewise.
855 (elf_backend_hash_symbol): Likewise.
856 (elf_backend_fixup_symbol): Likewise.
857 (elf_backend_parse_gnu_properties): Likewise.
858 (elf_backend_merge_gnu_properties): Likewise.
859 (elf_backend_merge_symbol_attribute): Likewise.
860 (elf_i386_mkobject): Updated.
861 (elf_i386_link_hash_table_create): Likewise.
862 (elf_i386_check_tls_transition): Likewise.
863 (elf_i386_tls_transition): Likewise.
864 (elf_i386_convert_load_reloc): Likewise.
865 (elf_i386_check_relocs): Likewise.
866 (elf_i386_adjust_dynamic_symbol): Likewise.
867 (elf_i386_allocate_dynrelocs): Likewise.
868 (elf_i386_convert_load): Likewise.
869 (elf_i386_size_dynamic_sections): Likewise.
870 (elf_i386_relocate_section): Likewise.
871 (elf_i386_finish_dynamic_symbol ): Likewise.
872 (elf_i386_finish_dynamic_sections): Likewise.
873 (elf_i386_output_arch_local_syms): Likewise.
874 (elf_i386_get_synthetic_symtab): Likewise.
875 (elf_i386_link_setup_gnu_properties): Likewise.
876 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
877 of elf_link_hash_table, as base.
878 (elf_i386_next_tls_desc_index): New.
879 (elf_i386_srelplt2): Likewise.
880 (elf_i386_plt): Likewise.
881 (elf_i386_lazy_plt): Likewise.
882 (elf_i386_non_lazy_plt): Likewise.
883 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
884 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
885 "objalloc.h" and "hashtab.h".
886 (ELIMINATE_COPY_RELOCS): Removed.
887 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
888 (SYMBOL_NO_COPYRELOC): Likewise.
889 (elf_x86_64_link_hash_entry): Likewise.
890 (GOT_UNKNOWN): Likewise.
891 (GOT_NORMAL): Likewise.
892 (GOT_TLS_GD): Likewise.
893 (elf_x86_64_hash_entry): Likewise.
894 (elf_x86_64_obj_tdata): Likewise.
895 (elf_x86_64_tdata): Likewise.
896 (elf_x86_64_local_got_tls_type): Likewise.
897 (elf_x86_64_local_tlsdesc_gotent): Likewise.
898 (elf_x86_64_hash_table): Likewise.
899 (elf_x86_64_link_hash_newfunc): Likewise.
900 (elf_x86_64_local_htab_hash): Likewise.
901 (elf_x86_64_local_htab_eq): Likewise.
902 (elf_x86_64_get_local_sym_hash): Likewise.
903 (elf_x86_64_link_hash_table_free): Likewise.
904 (elf_x86_64_copy_indirect_symbol): Likewise.
905 (elf_x86_64_fixup_symbol): Likewise.
906 (elf_x86_64_readonly_dynrelocs): Likewise.
907 (elf_x86_64_always_size_sections): Likewise.
908 (elf_x86_64_set_tls_module_base): Likewise.
909 (elf_x86_64_dtpoff_base): Likewise.
910 (compare_relocs): Likewise.
911 (elf_x86_64_merge_symbol_attribute): Likewise.
912 (elf_x86_64_hash_symbol): Likewise.
913 (elf_x86_64_parse_gnu_properties): Likewise.
914 (elf_x86_64_merge_gnu_properties): Likewise.
915 (elf_x86_64_link_check_relocs): Likewise.
916 (elf_backend_copy_indirect_symbol): Likewise.
917 (elf_backend_always_size_sections): Likewise.
918 (bfd_elf64_bfd_link_check_relocs): Likewise.
919 (elf_backend_merge_symbol_attribute): Likewise.
920 (elf_backend_hash_symbol): Likewise.
921 (elf_backend_omit_section_dynsym): Likewise.
922 (elf_backend_fixup_symbol): Likewise.
923 (elf_backend_parse_gnu_properties): Likewise.
924 (elf_backend_merge_gnu_properties): Likewise.
925 (bfd_elf32_bfd_link_check_relocs): Likewise.
926 (elf_x86_64_mkobject): Updated.
927 (elf_x86_64_link_hash_table_create): Likewise.
928 (elf_x86_64_check_tls_transition): Likewise.
929 (elf_x86_64_tls_transition): Likewise.
930 (elf_x86_64_convert_load_reloc): Likewise.
931 (elf_x86_64_check_relocs): Likewise.
932 (elf_x86_64_adjust_dynamic_symbol): Likewise.
933 (elf_x86_64_allocate_dynrelocs): Likewise.
934 (elf_x86_64_convert_load): Likewise.
935 (elf_x86_64_size_dynamic_sections): Likewise.
936 (elf_x86_64_relocate_section): Likewise.
937 (elf_x86_64_finish_dynamic_symbol ): Likewise.
938 (elf_x86_64_finish_dynamic_sections): Likewise.
939 (elf_x86_64_output_arch_local_syms): Likewise.
940 (elf_x86_64_get_synthetic_symtab): Likewise.
941 (elf_x86_64_link_setup_gnu_properties): Likewise.
942 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
943 instead of elf_link_hash_table, as base.
944 (elf_x86_64_next_tls_desc_index): New.
945 (elf_x86_64_srelplt2): Likewise.
946 (elf_x86_64_plt): Likewise.
947 (elf_x86_64_lazy_plt): Likewise.
948 (elf_x86_64_non_lazy_plt): Likewise.
949 * elfxx-x86.c: New file.
950 * elfxx-x86.h: Likewise.
952 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
954 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
956 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
958 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
960 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
961 sections before checking dynamic relocations and free invalid
962 PLT section contents.
963 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
965 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
967 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
968 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
970 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
973 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
975 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
977 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
979 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
981 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
983 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
986 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
987 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
988 Add a has_no_copy_on_protected bitfield.
989 (elf_has_no_copy_on_protected): New.
990 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
991 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
992 (elf_merge_gnu_property_list): Likewise.
993 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
994 to FALSE for elf_has_no_copy_on_protected.
995 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
996 (elf_i386_link_hash_entry): Add def_protected.
997 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
998 when checking info->nocopyreloc.
999 (elf_i386_link_setup_gnu_properties): Don't set
1000 extern_protected_data here.
1001 (elf_i386_merge_symbol_attribute): New function.
1002 (elf_backend_merge_symbol_attribute): New.
1003 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1004 (elf_x86_64_link_hash_entry): Add def_protected.
1005 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1006 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1007 when checking info->nocopyreloc.
1008 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1009 relocation run-time overflow and unresolvable R_X86_64_32S
1010 relocation against protected data symbol defined in shared object
1011 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1012 (elf_x86_64_link_setup_gnu_properties): Don't set
1013 extern_protected_data here.
1014 (elf_x86_64_merge_symbol_attribute): New function.
1015 (elf_backend_merge_symbol_attribute): New.
1017 2017-08-26 Alan Modra <amodra@gmail.com>
1019 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1020 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1021 (ppc_elf_relocate_section): Comment fix.
1022 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1023 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1024 Support dynamic relocs for TPREL16 when non-pic too.
1025 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1026 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1029 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1031 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1032 "symbol" in comments.
1033 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1035 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1038 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1039 R_X86_64_PC32 relocation run-time overflow and unresolvable
1040 R_X86_64_32S relocation with -z nocopyreloc.
1042 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1044 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1045 Undefined symbols may not have a type.
1046 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1048 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1050 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1051 bfd_link_info. Report shared, PIE or PDE object based on
1053 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1054 (elf_x86_64_relocate_section): Likewise.
1056 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1058 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1059 for function symbols.
1060 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1062 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1064 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1065 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1066 is set on any input relocatable file.
1067 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1069 2017-08-23 Alan Modra <amodra@gmail.com>
1072 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1073 ensure_undefweak_dynamic. Handle undefined too.
1074 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1075 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1076 (allocate_dynrelocs): Discard undefined non-default visibility
1077 relocs first. Make undefined syms dynamic. Tidy goto.
1079 2017-08-21 Alan Modra <amodra@gmail.com>
1080 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1084 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1086 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1089 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1090 undefined weak symbols.
1092 2017-08-18 Nick Clifton <nickc@redhat.com>
1095 * tekhex.c (getsym): Fix check for source pointer walking off the
1096 end of the input buffer.
1098 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1101 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1102 relocations in debug sections, change abort to _bfd_error_handler.
1104 2017-08-14 Nick Clifton <nickc@redhat.com>
1107 * elf.c (setup_group): Check for an empty or very small group
1109 * po/bfd.pot: Regenerate.
1111 2017-08-14 Alan Modra <amodra@gmail.com>
1114 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1115 alignment padding here.
1116 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1117 in a reverse pass over sections.
1119 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1122 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1123 for @plt suffixes first.
1124 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1126 2017-08-08 Nick Clifton <nickc@redhat.com>
1129 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1130 small section lengths.
1131 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1133 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1134 there is enough data present in the note.
1136 2017-08-08 Alan Modra <amodra@gmail.com>
1139 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1140 got.refcount for GOTOFF relocs, just create .got section.
1142 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1144 * elflink.c (elf_link_add_object_symbols): Move common symbol
1145 check after bed->common_definition.
1147 2017-08-07 Alan Modra <amodra@gmail.com>
1150 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1151 needed to define various dynamic tags have been discarded.
1153 2017-08-07 Nick Clifton <nickc@redhat.com>
1156 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1157 has not been set then use the bfd returned by
1158 _bfd_elf_link_setup_gnu_properties. If that is null then search
1159 through all the input bfds selecting the first normal, ELF format
1161 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1163 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1165 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1167 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1168 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1169 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1170 (elf_i386_link_check_relocs): New function.
1171 (bfd_elf32_bfd_link_check_relocs): New.
1172 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1174 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1175 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1176 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1177 (elf_x86_64_link_check_relocs): New function.
1178 (bfd_elf64_bfd_link_check_relocs): New.
1179 (bfd_elf32_bfd_link_check_relocs): Likewise.
1181 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1184 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1185 as undefined for --no-define-common.
1187 2017-08-05 Alan Modra <amodra@gmail.com>
1189 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1190 hppa_link_hash_table.
1192 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1194 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1195 entries for sysregs with negative indices.
1197 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1199 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1200 isn't the S/390 specific elf data.
1201 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1203 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1205 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1206 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1207 [R_RISCV_ADD16]: Likewise.
1208 [R_RISCV_ADD32]: Likewise.
1209 [R_RISCV_ADD64]: Likewise.
1210 [R_RISCV_SUB6]: Likewise.
1211 [R_RISCV_SUB8]: Likewise.
1212 [R_RISCV_SUB16]: Likewise.
1213 [R_RISCV_SUB32]: Likewise.
1214 [R_RISCV_SUB64]: Likewise.
1216 2017-07-31 Alan Modra <amodra@gmail.com>
1218 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1219 without ld.so checks.
1221 2017-07-29 Alan Modra <amodra@gmail.com>
1224 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1225 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1226 (is_elfv2_localentry0): Test non_zero_localentry.
1227 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1229 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1231 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1232 pointer check for htab->elf.irelplt.
1233 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1235 2017-07-27 Nick Clifton <nickc@redhat.com>
1238 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1240 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1242 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1244 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1246 (evax_bfd_print_emh): Check for invalid string lengths.
1248 2017-07-25 Nick Clifton <nickc@redhat.com>
1250 * po/fr.po: Updated French translation.
1252 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1255 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1256 16-bit absolute branches into 10-bit pc-relative branches on the
1257 MSP430 as well as the MSP430X.
1259 2017-07-25 Alan Modra <amodra@gmail.com>
1261 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1262 (stub_eh_frame_size): New function.
1263 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1264 (group_sections): Init group tls_get_addr_opt_bctrl.
1265 (ppc64_elf_size_stubs): Update sizing and initialization of
1266 .eh_frame. Iteration over stubs via group list.
1267 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1268 (ppc64_elf_finish_dynamic_sections): Update finalization of
1271 2017-07-24 Nick Clifton <nickc@redhat.com>
1274 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1275 of the relocs to the canonicalize_one_reloc routine.
1276 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1277 for the _bfd_mach_o_canonicalize_one_reloc field.
1278 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1279 res_base parameter. Use to check for corrupt pair relocs.
1280 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1282 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1284 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1287 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1288 enough data in the record before attempting to parse it.
1289 (_bfd_vms_slurp_eeom): Likewise.
1291 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1292 (image_set_ptr): Likewise.
1293 (alpha_vms_slurp_relocs): Likewise.
1295 (alpha_vms_object_p): Check for a truncated record.
1297 2017-07-24 Nick Clifton <nickc@redhat.com>
1300 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1301 an unrecognized reloc and sets the bfd_error value.
1302 * libbfd.h: Regenerate.
1303 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1305 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1306 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1307 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1308 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1309 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1311 2017-07-23 Alan Modra <amodra@gmail.com>
1313 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1316 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1319 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1320 reloc_class_ifunc for ifunc symbols.
1322 2017-07-19 Nick Clifton <nickc@redhat.com>
1325 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1326 correct magic bytes at the start, set the error to wrong format
1327 and clear the format selector before returning NULL.
1329 2017-07-19 Nick Clifton <nickc@redhat.com>
1332 * coff-rs6000.c (_bfd_strntol): New function.
1333 (_bfd_strntoll): New function.
1334 (GET_VALUE_IN_FIELD): New macro.
1335 (EQ_VALUE_IN_FIELD): new macro.
1336 (_bfd_xcoff_slurp_armap): Use new macros.
1337 (_bfd_xcoff_archive_p): Likewise.
1338 (_bfd_xcoff_read_ar_hdr): Likewise.
1339 (_bfd_xcoff_openr_next_archived_file): Likewise.
1340 (_bfd_xcoff_stat_arch_elt): Likewise.
1341 * coff64-rs6000.c (_bfd_strntol): New function.
1342 (_bfd_strntoll): New function.
1343 (GET_VALUE_IN_FIELD): New macro.
1344 (xcoff64_slurp_armap): Use new macros.
1346 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1347 John Eric Martin <John.Martin@emmicro-us.com>
1349 * bfd-in2.h: Regenerate.
1350 * libbfd.h: Regenerate.
1351 * elf32-arc.c (JLI): Define.
1352 * reloc.c: Add JLI relocations.
1354 2017-07-18 Nick Clifton <nickc@redhat.com>
1357 * coff-sh.c: Fix spelling typos.
1358 * compress.c: Likewise.
1359 * cpu-pdp11.c: Likewise.
1360 * ecofflink.c: Likewise.
1361 * elf-m10300.c: Likewise.
1363 * elf32-arm.c: Likewise.
1364 * elf32-m68k.c: Likewise.
1365 * elf32-nds32.c: Likewise.
1366 * elf32-ppc.c: Likewise.
1367 * elf32-sh.c: Likewise.
1368 * elf32-v850.c: Likewise.
1369 * elf64-ppc.c: Likewise.
1370 * elf64-x86-64.c: Likewise.
1371 * elflink.c: Likewise.
1372 * elfnn-aarch64.c: Likewise.
1373 * elfxx-mips.c: Likewise.
1375 * sunos.c: Likewise.
1376 * vms-alpha.c: Likewise.
1377 * xcofflink.c: Likewise.
1379 2017-07-18 Nick Clifton <nickc@redhat.com>
1382 * coffcode.h (handle_COMDAT): Replace abort with an error message
1385 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1388 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1391 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1393 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1395 2017-07-16 Alan Modra <amodra@gmail.com>
1397 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1398 __tls_index GOT entries when using __tls_get_addr_opt stub.
1399 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1401 2017-07-12 Alan Modra <amodra@gmail.com>
1403 * po/es.po: Update from translationproject.org/latest/bfd/.
1404 * po/fi.po: Likewise.
1405 * po/fr.po: Likewise.
1406 * po/id.po: Likewise.
1407 * po/ja.po: Likewise.
1408 * po/ro.po: Likewise.
1409 * po/ru.po: Likewise.
1410 * po/sr.po: Likewise.
1411 * po/sv.po: Likewise.
1412 * po/tr.po: Likewise.
1413 * po/uk.po: Likewise.
1414 * po/vi.po: Likewise.
1415 * po/zh_CN.po: Likewise.
1416 * po/hr.po: New file from translationproject.org.
1417 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1418 * configure: Regenerate.
1420 2017-07-12 Nick Clifton <nickc@redhat.com>
1422 Fix compile time warnings using gcc 7.1.1.
1423 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1425 (elf_xtensa_get_gotplt_section): Increase length of got_name
1427 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1428 default return of FALSE.
1429 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1430 default return of FALSE.
1432 2017-07-12 Alan Modra <amodra@gmail.com>
1434 * binary.c (binary_set_section_contents): Don't print filepos in
1436 (coff_write_object_contents): Cast size_t for error message.
1437 (coff_slurp_line_table): Don't use bfd_vma symndx.
1438 (coff_slurp_reloc_table): Remove unneeded cast.
1439 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1441 (find_abstract_instance_name): Likewise.
1442 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1443 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1444 (elf32_arm_check_relocs): Make r_symndx an int.
1445 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1447 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1449 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1451 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1452 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1453 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1454 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1455 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1456 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1457 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1458 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1459 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1460 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1461 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1462 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1463 and use %lu for error message.
1464 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1465 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1468 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1470 (elf32_arm_final_link_relocate): Likewise.
1471 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1472 * coffcode.h (styp_to_sec_flags): Likewise.
1473 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1474 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1475 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1476 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1477 (elf32_bfin_merge_private_bfd_data): Likewise.
1478 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1479 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1480 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1481 (i370_elf_relocate_section): Likewise.
1482 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1483 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1484 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1485 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1486 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1487 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1488 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1489 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1490 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1491 * ieee.c (ieee_write_id, read_id): Likewise.
1492 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1493 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1494 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1495 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1496 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1497 * stabs.c (_bfd_link_section_stabs): Likewise.
1499 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1501 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1502 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1503 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1504 * coff-sh.c (sh_relax_section): Likewise.
1505 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1506 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1507 * coffcode.h (coff_slurp_reloc_table): Likewise.
1508 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1509 (_bfd_coff_read_string_table): Likewise.
1510 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1511 * compress.c (bfd_get_full_section_contents): Likewise.
1512 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1513 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1514 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1515 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1516 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1517 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1518 (elf32_arm_write_section): Likewise.
1519 * elf32-bfin.c (bfin_relocate_section): Likewise.
1520 (bfinfdpic_relocate_section): Likewise.
1521 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1522 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1523 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1524 (elf_i386_relocate_section): Likewise.
1525 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1526 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1527 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1528 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1529 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1530 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1531 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1532 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1533 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1534 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1535 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1536 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1537 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1538 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1539 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1540 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1541 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1542 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1543 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1544 * elf32-sh.c (sh_elf_relax_section): Likewise.
1545 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1546 (sh_elf_relocate_section): Likewise.
1547 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1548 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1549 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1550 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1551 * elf32-v850.c (v850_elf_relax_section): Likewise.
1552 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1553 (elf_vax_relocate_section): Likewise.
1554 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1555 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1556 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1557 (do_fix_for_relocatable_link): Likewise.
1558 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1559 (elf64_alpha_relax_with_lituse): Likewise.
1560 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1561 (elf_hppa_final_link_relocate): Likewise.
1562 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1563 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1564 (elf64_vms_link_add_object_symbols): Likewise.
1565 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1566 (mmix_final_link_relocate): Likewise.
1567 * elf64-s390.c (invalid_tls_insn): Likewise.
1568 (elf_s390_relocate_section): Likewise.
1569 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1570 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1571 (elf_x86_64_relocate_section): Likewise.
1572 * elfcode.h (elf_slurp_symbol_table): Likewise.
1573 * elfcore.h (elf_core_file_p): Likewise.
1574 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1575 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1576 (elfNN_aarch64_relocate_section): Likewise.
1577 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1578 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1579 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1580 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1581 (_bfd_mips_elf_relocate_section): Likewise.
1582 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1583 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1584 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1585 * ieee.c (ieee_slurp_external_symbols): Likewise.
1586 * ihex.c (ihex_write_object_content): Likewise.
1587 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1588 * merge.c (_bfd_merged_section_offset): Likewise.
1589 * mmo.c (mmo_write_loc_chunk): Likewise.
1590 (mmo_write_object_contents): Likewise.
1591 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1592 * stabs.c (_bfd_link_section_stabs): Likewise.
1593 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1595 2017-07-11 Alan Modra <amodra@gmail.com>
1597 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1599 2017-07-11 Alan Modra <amodra@gmail.com>
1601 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1602 instruction" error using _bfd_error_handler, not einfo.
1604 2017-07-10 Nick Clifton <nickc@redhat.com>
1606 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1607 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1609 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1611 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1613 2017-07-07 Alan Modra <amodra@gmail.com>
1615 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1617 2017-07-07 Alan Modra <amodra@gmail.com>
1619 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1620 as long long. Move code replacing "ll" with "I64", and simplify.
1622 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1624 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1627 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1629 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1631 (line_info_add_file_name): Likewise.
1632 (decode_line_info): Likewise.
1634 2017-07-04 Tristan Gingold <gingold@adacore.com>
1636 * version.m4: Bump version to 2.29.51
1637 * configure: Regenerate.
1639 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1641 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1642 sanity check at the head of this function.
1644 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1646 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1647 dwarf_line_str_size.
1648 (struct attr_abbrev): Add field implicit_const.
1649 (dwarf_debug_sections): Add .debug_line_str.
1650 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1651 (dwarf_debug_section_assert): Add static assertion.
1652 (read_indirect_line_string): New.
1653 (read_abbrevs): Support DW_FORM_implicit_const.
1654 (is_str_attr): Support DW_FORM_line_strp.
1655 (read_attribute_value): Support DW_FORM_line_strp and
1656 DW_FORM_implicit_const.
1657 (read_attribute): Support DW_FORM_implicit_const.
1658 (line_info_add_include_dir, line_info_add_include_dir_stub):
1659 (line_info_add_file_name, read_formatted_entries): New.
1660 (decode_line_info, parse_comp_unit): Support DWARF 5.
1661 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1663 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1665 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1666 abort statement that was put for symbols that are not dynamic.
1668 2017-07-03 Tristan Gingold <gingold@adacore.com>
1670 * po/bfd.pot: Regenerate
1672 2017-07-03 Alan Modra <amodra@gmail.com>
1674 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1675 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1676 * elf.c (setup_group): Use "Lx" to print sh_size.
1677 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1678 unknown section type in hex.
1679 (copy_special_section_fields): Style fix.
1680 (bfd_section_from_shdr): Correct format for sh_link. Use a
1681 common error message for all the variants of unrecognized
1683 (assign_file_positions_for_load_sections): Use "Lx" for lma
1684 adjust error message.
1685 (assign_file_positions_for_non_load_sections): Formatting.
1686 (rewrite_elf_program_header): Formatting. Use "Lx" for
1687 bfd_vma values in error messages.
1688 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1689 ELF_R_SYM value to type expected by format.
1690 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1692 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1693 (elf_link_input_bfd): Use "Lx" for r_info.
1694 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1696 2017-07-03 Alan Modra <amodra@gmail.com>
1698 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1699 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1700 Microsoft C library variant of long long format specifier.
1701 (PRINT20): Cast value to bfd_uint64_t not long long.
1702 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1703 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1704 long long. Don't cast to bfd_vma.
1705 * elf32-score.c (score3_bfd_getl48): Likewise.
1706 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1708 2017-07-03 Alan Modra <amodra@gmail.com>
1710 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1712 (bfd_elf_print_symbol): Don't cast symbol->flags.
1713 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1714 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1715 _bfd_error_handler argument order.
1716 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1718 2017-07-03 Alan Modra <amodra@gmail.com>
1720 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1721 AC_TYPE_LONG_DOUBLE.
1722 * configure: Regenerate.
1723 * config.in: Regenerate.
1725 2017-06-29 Andrew Waterman <andrew@sifive.com>
1727 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1730 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1732 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1733 unless it is undefined weak.
1734 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1735 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1737 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1738 is not dynamic in PIC, abort.
1740 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1743 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1744 undefined weak symbols into dynamic.
1745 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1746 relocation for non-dynamic symbols.
1747 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1749 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1751 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1752 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1753 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1754 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1755 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1758 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1760 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1761 (elfcore_write_s390_gs_bc): Likewise.
1762 * elf.c (elfcore_grok_s390_gs_cb): New function.
1763 (elfcore_grok_s390_gs_bc): New function.
1764 (elfcore_grok_note): Call them.
1765 (elfcore_write_s390_gs_cb): New function.
1766 (elfcore_write_s390_gs_bc): New function.
1767 (elfcore_write_register_note): Call them.
1769 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1771 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1772 bfd_get_file_size. Check archive element size.
1773 (_bfd_generic_get_section_contents_in_window): Likewise.
1775 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1777 * bfd-in2.h: Regenerated.
1778 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1779 (bfd_get_file_size): Likewise.
1781 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1782 Matthew Fortune <matthew.fortune@imgtec.com>
1784 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1785 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1786 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1787 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1789 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1790 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1791 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1792 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1793 `bfd_mach_mips_interaptiv_mr2' entries.
1794 * bfd-in2.h: Regenerate.
1796 2017-06-27 Nick Clifton <nickc@redhat.com>
1798 * tekhex.c (pass_over): Revert accidental conversion of a local
1799 array to a static array.
1801 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1804 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1805 reloc addend if necessary. Adjust diff only if
1806 shrinked_insn_address < end_address.
1808 2017-06-27 Alan Modra <amodra@gmail.com>
1811 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1812 (_bfd_generic_get_section_contents_in_window): Likewise.
1814 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1816 * elfnn-riscv.c (perform_relocation): Support the new
1817 R_RISCV_32_PCREL relocation.
1818 (riscv_elf_relocate_section): Likewise.
1819 * elfxx-riscv.c (howto_table): Likewise.
1820 (riscv_reloc_map): Likewise.
1821 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1822 * libbfd.h: Regenerate.
1824 2017-06-27 Alan Modra <amodra@gmail.com>
1827 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1828 Use unsigned file pointer type, and remove cast.
1829 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1830 Add "count", not "sz".
1832 2017-06-26 Pedro Alves <palves@redhat.com>
1835 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1838 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1841 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1844 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1846 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1847 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1848 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1849 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1850 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1852 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1855 * compress.c (bfd_get_full_section_contents): Don't check the
1857 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1858 reject a section whose size + offset is greater than the size
1860 (_bfd_generic_get_section_contents_in_window): Likewise.
1862 2017-06-26 Nick Clifton <nickc@redhat.com>
1865 * tekhex.c (getvalue): Check for the source pointer exceeding the
1866 end pointer before the first byte is read.
1868 2017-06-26 Nick Clifton <nickc@redhat.com>
1871 * opncls.c (get_build_id): Check that the section is big enough
1872 to contain the whole note.
1873 * compress.c (bfd_get_full_section_contents): Check for and reject
1874 a section whose size is greater than the size of the entire file.
1875 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1876 contain a notes section.
1878 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1880 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1882 (elf_s390_modify_segment_map): Likewise.
1883 (bfd_elf_s390_set_options): Lisewise.
1885 2017-06-26 Alan Modra <amodra@gmail.com>
1887 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1889 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1890 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1891 .preinit_array on --just-syms bfds.
1892 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1893 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1894 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1896 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1898 * elf.c (find_link): Bounds check "hint".
1900 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1902 * elf32-arm.c (using_thumb_only): Update list of architectures in
1903 BFD_ASSERT for which the logic is valid.
1904 (using_thumb2_bl): Likewise.
1905 (using_thumb2): Likewise and return true for ARMv8-R.
1906 (arch_has_arm_nop): Likewise.
1907 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1908 merging logic. Update commentis for value 15 of v8m_baseline,
1909 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1910 merging of value 15 of Tag_CPU_arch.
1912 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1914 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1915 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1916 * bfd-in2.h: Regenerate.
1918 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1920 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1921 the error_alignment label forward. Properly align program
1922 property note section.
1924 2017-06-22 Eric Christopher <echristo@gmail.com>
1926 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1927 abs to fix a truncation warning.
1929 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1931 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1932 local undefined weak symbol to 0.
1933 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1935 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1937 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1938 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1939 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1940 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1941 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1942 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1943 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1944 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1946 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1948 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1949 (elf_i386_lazy_ibt_plt_entry): Likewise.
1950 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1951 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1952 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1953 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1954 (elf_i386_lazy_plt_layout): Likewise.
1955 (elf_i386_non_lazy_plt_layout): Likewise.
1956 (elf_i386_link_hash_entry): Add plt_second.
1957 (elf_i386_link_hash_table): Add plt_second and
1958 plt_second_eh_frame.
1959 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1960 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1961 the second PLT. Check the second PLT.
1962 (elf_i386_relocate_section): Use the second PLT to resolve
1963 PLT reference if needed.
1964 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1966 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1967 second PLT. Generate unwind info for the second PLT.
1968 (elf_i386_plt_type): Add plt_second.
1969 (elf_i386_get_synthetic_symtab): Support the second PLT.
1970 (elf_i386_parse_gnu_properties): Support
1971 GNU_PROPERTY_X86_FEATURE_1_AND.
1972 (elf_i386_merge_gnu_properties): Support
1973 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1974 on GNU_PROPERTY_X86_FEATURE_1_IBT
1975 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1976 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1977 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1978 is set on all relocatable inputs.
1979 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1980 (elf_x32_lazy_ibt_plt_entry): Likewise.
1981 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1982 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1983 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1984 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1985 (elf_x86_64_lazy_ibt_plt): Likewise.
1986 (elf_x32_lazy_ibt_plt): Likewise.
1987 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1988 (elf_x32_non_lazy_ibt_plt): Likewise.
1989 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1990 (elf_x86_64_parse_gnu_properties): Support
1991 GNU_PROPERTY_X86_FEATURE_1_AND.
1992 (elf_x86_64_merge_gnu_properties): Support
1993 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1994 on GNU_PROPERTY_X86_FEATURE_1_IBT
1995 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1996 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1997 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1998 is set on all relocatable inputs.
2000 2017-06-22 Nick Clifton <nickc@redhat.com>
2003 * som.c (setup_sections): NUL terminate the space_strings buffer.
2004 Check that the space.name field does not index beyond the end of
2005 the space_strings buffer.
2007 2017-06-21 Nick Clifton <nickc@redhat.com>
2010 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2012 2017-06-21 Nick Clifton <nickc@redhat.com>
2015 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2016 type of the size parameter.
2017 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2018 length of the counted string.
2019 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2020 (_bfd_vms_save_counted_string): Likewise.
2021 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2022 _bfd_vms_save_counted_string.
2023 (_bfd_vms_slurp_ehdr): Likewise.
2024 (_bfd_vms_slurp_egsd): Likewise.
2025 (Parse_module): Likewise.
2027 2017-06-21 Alan Modra <amodra@gmail.com>
2029 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2030 calls before tocsave calls.
2031 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2034 2017-06-21 Nick Clifton <nickc@redhat.com>
2037 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2038 bfd_get_full_section_contents returns no contents.
2040 2017-06-21 Nick Clifton <nickc@redhat.com>
2043 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2046 2017-06-21 Nick Clifton <nickc@redhat.com>
2049 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2051 (image_set_ptr): Likewise.
2052 (alpha_vms_fix_sec_rel): Likewise.
2053 (alpha_vms_slurp_relocs): Likewise.
2055 2017-06-21 Nick Clifton <nickc@redhat.com>
2058 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2060 (ieee_archive_p): Likewise.
2061 (ieee_object_p): Likewise.
2063 2017-06-21 Nick Clifton <nickc@redhat.com>
2066 * elf.c (setup_group): Zero the group section pointer list after
2067 allocation so that loops can be caught. Check for NULL pointers
2068 when processing a group list.
2070 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2072 * elf-s390.h: New file.
2073 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2075 (elf_s390_additional_program_headers): New function.
2076 (elf_s390_modify_segment_map): New function.
2077 (bfd_elf_s390_set_options): New function.
2078 (elf_backend_additional_program_headers)
2079 (elf_backend_modify_segment_map): Add macro definitions.
2081 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2084 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2085 the DYNAMIC bit instead of bfd_count_sections.
2087 2017-06-19 Nick Clifton <nickc@redhat.com>
2090 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2092 (evax_bfd_print_eeom): Likewise.
2093 (evax_bfd_print_egsd): Check for an overlarge record length.
2094 (evax_bfd_print_etir): Likewise.
2096 2017-06-19 Nick Clifton <nickc@redhat.com>
2099 * libieee.h (struct common_header_type): Add end_p field.
2100 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2102 (read_id): Check for a length that exceeds the remaining bytes in
2104 (ieee_seek): Initialise end_p.
2105 (ieee_archive_p): Likewise.
2106 (ieee_object_p): Likewise.
2108 2017-06-19 Nick Clifton <nickc@redhat.com>
2111 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2112 before reading the EIHS structure entries.
2114 2017-06-19 Nick Clifton <nickc@redhat.com>
2117 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2118 gsd_size. Check that there are enough bytes remaining to read the
2119 type and size of the next egsd. Check that the size of the egsd
2120 does not exceed the size of the record.
2122 2017-06-19 Alan Modra <amodra@gmail.com>
2124 * config.bfd: Correct targ_underscore for cris.
2126 2017-06-18 Alan Modra <amodra@gmail.com>
2128 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2129 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2131 2017-06-16 Nick Clifton <nickc@redhat.com>
2133 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2134 bucketlist is empty because there are no symbols to add to the
2137 2017-06-16 Alan Modra <amodra@gmail.com>
2143 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2144 (BFD_JUMP_TABLE_LINK): Likewise.
2145 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2146 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2147 (bfd_elf_define_start_stop): New function.
2148 * linker.c (bfd_generic_define_start_stop): New function.
2149 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2151 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2152 * aout-target.h (MY_bfd_define_start_stop): Define.
2153 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2154 * binary.c (binary_bfd_define_start_stop): Define.
2155 * bout.c (b_out_bfd_define_start_stop): Define.
2156 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2157 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2158 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2159 * coffcode.h (coff_bfd_define_start_stop): Define.
2160 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2161 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2162 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2163 * ieee.c (ieee_bfd_define_start_stop): Define.
2164 * ihex.c (ihex_bfd_define_start_stop): Define.
2165 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2166 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2167 * mmo.c (mmo_bfd_define_start_stop): Define.
2168 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2169 * oasys.c (oasys_bfd_define_start_stop): Define.
2170 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2171 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2172 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2173 * som.c (som_bfd_define_start_stop): Define.
2174 * srec.c (srec_bfd_define_start_stop): Define.
2175 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2176 * versados.c (versados_bfd_define_start_stop): Define.
2177 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2178 (alpha_vms_bfd_define_start_stop): Define.
2179 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2180 * bfd-in2.h: Regenerate.
2181 * libbfd.h: Regenerate.
2183 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2185 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2186 SYMBOL_REFERENCES_LOCAL.
2188 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2191 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2192 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2193 runtime for if there needs copy relocation elimination.
2194 (need_copy_relocation_p): New function. Return true for symbol with
2195 pc-relative references and if it's against read-only sections.
2196 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2197 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2198 that are related with accessing external objects.
2199 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2200 in elfNN_aarch64_check_relocs.
2202 2017-06-15 Nick Clifton <nickc@redhat.com>
2205 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2208 (ieee_archive_p): Likewise.
2210 2017-06-15 Nick Clifton <nickc@redhat.com>
2213 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2215 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2217 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2218 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2219 keep both windowed and call0 ABI PLT definitions.
2220 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2221 elf_xtensa_*_plt_entry endex.
2222 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2224 2017-06-14 Nick Clifton <nickc@redhat.com>
2227 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2230 2017-06-14 Nick Clifton <nickc@redhat.com>
2233 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2234 maximum value for the ascic pointer. Check that name processing
2235 does not read beyond this value.
2236 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2239 2017-06-14 Nick Clifton <nickc@redhat.com>
2242 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2243 (process_otr): Check for an invalid offset in the otr structure.
2245 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2247 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2249 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2255 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2256 vtable field to a union.
2257 (_bfd_elf_is_start_stop): Removed.
2258 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2259 __start_SECNAME and __stop_SECNAME symbols.
2260 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2261 * elflink.c (_bfd_elf_is_start_stop): Removed.
2262 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2263 _bfd_elf_is_start_stop.
2264 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2265 __stop_SECNAME symbols. Updated.
2266 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2267 (bfd_elf_gc_record_vtinherit): Likewise.
2268 (bfd_elf_gc_record_vtentry): Likewise.
2270 2017-06-13 Nick Clifton <nickc@redhat.com>
2273 * elflink.c (elf_link_adjust_relocs): Generate an error when
2274 encountering a reloc against a symbol removed by garbage
2277 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2279 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2280 to merge_gnu_properties.
2281 * elf-properties.c (elf_merge_gnu_properties): Add struct
2282 bfd_link_info * and pass it to merge_gnu_properties.
2283 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2284 and pass it to elf_merge_gnu_properties.
2285 (_bfd_elf_link_setup_gnu_properties): Pass info to
2286 elf_merge_gnu_property_list.
2287 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2289 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2291 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2294 * binary.c (binary_set_section_contents): Scale lma by octets
2295 per byte to set filepos.
2297 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2299 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2302 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2304 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2307 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2309 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2310 patched section contents for TLS IE reloc.
2311 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2313 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2315 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2316 RELOC_FOR_GLOBAL_SYMBOL macro.
2318 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2320 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2323 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2325 * config/tc-arc.c (md_undefined_symbol): Changed.
2326 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2328 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2330 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2333 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2335 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2336 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2338 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2340 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2343 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2345 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2346 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2347 is non-zero. Add clarifying comments.
2349 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2351 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2352 name. Use local IFUNC symbol name string to report unsupported
2353 non-PIC call to IFUNC function.
2354 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2355 when generating R_386_IRELATIVE relocation.
2356 (elf_i386_finish_dynamic_symbol): Likewise.
2357 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2359 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2360 when generating R_X86_64_IRELATIVE relocation.
2361 (elf_x86_64_finish_dynamic_symbol): Likewise.
2363 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2365 * elf.c (setup_group): Make sure BFD sections are created for all
2366 group sections in the input file when processing SHF_GROUP
2368 (bfd_section_from_shdr): Avoid duplicating logic already
2369 implemented in `setup_group'.
2371 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2374 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2375 if the hint address is zero.
2377 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2380 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2381 ELF_COMMON_DEF_P for common symbols.
2383 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2385 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2386 SEC_GROUP sections as SEC_EXCLUDE.
2387 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2388 (assign_section_numbers): Use resolve_section_groups flag instead
2389 of relocatable link type.
2390 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2391 flag instead of checking the final_link flag for part of the
2392 checks in here. Fix white space as a result.
2393 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2394 instead of relocatable link type.
2395 (bfd_elf_final_link): Likewise.
2397 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2399 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2401 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2402 (s3_bfd_score_elf_check_relocs): Likewise.
2403 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2404 (score_elf_final_link_relocate): Likewise.
2405 (s7_bfd_score_elf_check_relocs): Likewise.
2407 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2409 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2412 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2414 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2415 from `reloc_count' rather than decrementing it.
2416 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2417 `reloc_count' by `int_rels_per_ext_rel'.
2418 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2419 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2420 entry determination.
2421 (s3_bfd_score_elf_check_relocs): Likewise.
2422 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2423 (s7_bfd_score_elf_relocate_section): Likewise.
2424 (s7_bfd_score_elf_check_relocs): Likewise.
2425 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2426 prototype and function.
2427 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2428 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2429 triple rather than once the sum of REL and RELA relocation entry
2431 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2432 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2433 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2434 storage allocation size determination.
2435 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2436 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2437 by `int_rels_per_ext_rel' for last relocation entry
2439 (bfd_elf_final_link): Do not multiply `reloc_count' by
2440 `int_rels_per_ext_rel' for internal relocation storage
2441 allocation size determination.
2442 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2443 `int_rels_per_ext_rel' for last relocation entry determination.
2444 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2445 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2446 (_bfd_mips_elf_relocate_section): Likewise.
2448 2017-06-05 Alan Modra <amodra@gmail.com>
2451 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2453 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2455 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2456 determine structure sizes.
2457 (elfcore_grok_freebsd_prstatus): Likewise.
2459 2017-06-01 Alan Modra <amodra@gmail.com>
2461 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2462 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2464 (is_elfv2_localentry0): New function.
2465 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2466 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2467 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2468 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2469 optimized localentry:0 stubs.
2470 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2471 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2473 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2475 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2477 2017-05-30 Casey Smith <clegg89@gmail.com>
2480 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2481 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2483 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2485 * cpu-arc.c (arc_compatible): New function.
2487 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2489 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2491 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2494 * bfdio.c (bfd_get_file_size): New function.
2495 * bfd-in2.h: Regenerated.
2497 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2499 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2502 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2504 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2505 dynobj instead of htab->elf.dynobj.
2507 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2509 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2511 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2512 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2513 actual number of internal relocations retrieved. Adjust
2514 function description.
2515 (bfd_elf64_canonicalize_reloc): Remove macro.
2516 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2518 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2520 * archures.c (bfd_mach_sparc_v9m8): Define.
2521 (bfd_mach_sparc_v8plusm8): Likewise.
2522 (bfd_mach_sparc_v9_p): Adjust to M8.
2523 (bfd_mach_sparc_64bit_p): Likewise.
2524 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2525 bfd_mach_sparc_v8plusm8.
2526 * bfd-in2.h: Regenerated.
2527 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2529 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2530 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2531 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2533 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2534 bfd_mach_sparc_v8plusm8.
2536 2017-05-19 Alan Modra <amodra@gmail.com>
2538 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2539 debug and special sections when no non-note alloc sections in an
2542 2017-05-18 Alan Modra <amodra@gmail.com>
2544 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2545 * elf-m10300.c: Likewise.
2547 * elf32-arc.c: Likewise.
2548 * elf32-bfin.c: Likewise.
2549 * elf32-m68k.c: Likewise.
2550 * elf32-nds32.c: Likewise.
2551 * elf32-tilepro.c: Likewise.
2552 * elflink.c: Likewise.
2553 * elfnn-aarch64.c: Likewise.
2554 * elfnn-riscv.c: Likewise.
2555 * elfxx-tilegx.c: Likewise.
2556 * mach-o.c: Likewise.
2557 * peXXigen.c: Likewise.
2558 * vms-alpha.c: Likewise.
2559 * vms-lib.c: Likewise.
2561 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2564 * elflink.c (elf_gc_mark_debug_section): New function.
2565 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2566 referenced by kept debug sections.
2568 2017-05-16 Alan Modra <amodra@gmail.com>
2570 * elf-m10300.c: Rename occurrences of non_ir_ref.
2571 * elf32-arm.c: Likewise.
2572 * elf32-bfin.c: Likewise.
2573 * elf32-cr16.c: Likewise.
2574 * elf32-cris.c: Likewise.
2575 * elf32-d10v.c: Likewise.
2576 * elf32-dlx.c: Likewise.
2577 * elf32-fr30.c: Likewise.
2578 * elf32-frv.c: Likewise.
2579 * elf32-hppa.c: Likewise.
2580 * elf32-i370.c: Likewise.
2581 * elf32-i386.c: Likewise.
2582 * elf32-iq2000.c: Likewise.
2583 * elf32-lm32.c: Likewise.
2584 * elf32-m32c.c: Likewise.
2585 * elf32-m32r.c: Likewise.
2586 * elf32-m68hc1x.c: Likewise.
2587 * elf32-m68k.c: Likewise.
2588 * elf32-mcore.c: Likewise.
2589 * elf32-metag.c: Likewise.
2590 * elf32-microblaze.c: Likewise.
2591 * elf32-moxie.c: Likewise.
2592 * elf32-msp430.c: Likewise.
2593 * elf32-mt.c: Likewise.
2594 * elf32-nios2.c: Likewise.
2595 * elf32-or1k.c: Likewise.
2596 * elf32-ppc.c: Likewise.
2597 * elf32-rl78.c: Likewise.
2598 * elf32-s390.c: Likewise.
2599 * elf32-score.c: Likewise.
2600 * elf32-score7.c: Likewise.
2601 * elf32-sh.c: Likewise.
2602 * elf32-tic6x.c: Likewise.
2603 * elf32-tilepro.c: Likewise.
2604 * elf32-v850.c: Likewise.
2605 * elf32-vax.c: Likewise.
2606 * elf32-xstormy16.c: Likewise.
2607 * elf32-xtensa.c: Likewise.
2608 * elf64-alpha.c: Likewise.
2609 * elf64-hppa.c: Likewise.
2610 * elf64-ia64-vms.c: Likewise.
2611 * elf64-mmix.c: Likewise.
2612 * elf64-ppc.c: Likewise.
2613 * elf64-s390.c: Likewise.
2614 * elf64-sh64.c: Likewise.
2615 * elf64-x86-64.c: Likewise.
2616 * elflink.c: Likewise.
2617 * elfnn-aarch64.c: Likewise.
2618 * elfnn-ia64.c: Likewise.
2619 * elfnn-riscv.c: Likewise.
2620 * elfxx-mips.c: Likewise.
2621 * elfxx-sparc.c: Likewise.
2622 * elfxx-tilegx.c: Likewise.
2623 * linker.c: Likewise.
2625 2017-05-16 Alan Modra <amodra@gmail.com>
2627 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2628 * elflink.c (elf_link_add_object_symbols): Update to use
2630 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2632 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2634 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2636 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2638 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2640 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2641 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2643 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2645 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2647 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2649 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2650 to plt_second/plt_second_eh_frame.
2651 (elf_x86_64_link_hash_newfunc): Updated.
2652 (elf_x86_64_allocate_dynrelocs): Likewise.
2653 (elf_x86_64_size_dynamic_sections): Likewise.
2654 (elf_x86_64_relocate_section): Likewise.
2655 (elf_x86_64_finish_dynamic_symbol): Likewise.
2656 (elf_x86_64_finish_dynamic_sections): Likewise.
2657 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2658 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2660 (elf_backend_setup_gnu_properties): Updated. Create the
2661 .plt.sec section instead of the .plt.sec section.
2663 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2665 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2666 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2667 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2669 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2671 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2672 (bfd_elf64_set_reloc): Define.
2673 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2675 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2677 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2678 (struct bfd_target): New field _bfd_set_reloc.
2679 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2680 * reloc.c (_bfd_generic_set_reloc): New function.
2681 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2682 * nlm-target.h (nlm_set_reloc): Likewise.
2683 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2684 * aout-tic30.c (MY_set_reloc): Likewise.
2685 * aout-target.h (MY_set_reloc): Likewise.
2686 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2687 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2688 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2689 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2690 * aout-adobe.c (aout_32_set_reloc): Likewise.
2691 * bout.c (b_out_set_reloc): Likewise.
2692 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2693 * i386os9k.c (aout_32_set_reloc): Likewise.
2694 * ieee.c (ieee_set_reloc): Likewise.
2695 * oasys.c (oasys_set_reloc): Likewise.
2696 * som.c (som_set_reloc): Likewise.
2697 * versados.c (versados_set_reloc): Likewise.
2698 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2699 _bfd_generic_set_reloc.
2700 (rs6000_xcoff64_aix_vec): LIkewise.
2701 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2702 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2703 * i386msdos.c (msdos_set_reloc): Define to
2704 _bfd_norelocs_set_reloc.
2705 * elfcode.h (elf_set_reloc): Define.
2706 * bfd-in2.h: Regenerated.
2708 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2711 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2712 for IFUNC function address.
2714 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2716 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2717 (CONFLICT_LIST): Likewise.
2718 (opcode/arc-attrs.h): Include.
2719 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2720 (arc_extract_features): New file.
2721 (arc_stralloc): Likewise.
2722 (arc_elf_merge_attributes): Likewise.
2723 (arc_elf_merge_private_bfd_data): Use object attributes.
2724 (bfd_arc_get_mach_from_attributes): New function.
2725 (arc_elf_object_p): Use object attributes.
2726 (arc_elf_final_write_processing): Likewise.
2727 (elf32_arc_obj_attrs_arg_type): New function.
2728 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2729 (elf32_arc_section_from_shdr): Likewise.
2730 (elf_backend_obj_attrs_vendor): Define.
2731 (elf_backend_obj_attrs_section): Likewise.
2732 (elf_backend_obj_attrs_arg_type): Likewise.
2733 (elf_backend_obj_attrs_section_type): Likewise.
2734 (elf_backend_obj_attrs_handle_unknown): Likewise.
2735 (elf_backend_section_from_shdr): Likewise.
2737 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2740 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2741 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2742 and the destination is a Thumb symbol.
2744 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2746 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2747 initializer to silence GCC 4.2.
2748 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2750 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2752 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2753 (LAZY_PLT_ENTRY_SIZE): This.
2754 (NON_LAZY_PLT_ENTRY_SIZE): New.
2755 (elf_x86_64_plt0_entry): Renamed to ...
2756 (elf_x86_64_lazy_plt0_entry): This.
2757 (elf_x86_64_plt_entry): Renamed to ...
2758 (elf_x86_64_lazy_plt_entry): This.
2759 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2760 (elf_x86_64_lazy_bnd_plt0_entry): This.
2761 (elf_x86_64_legacy_plt_entry): Removed.
2762 (elf_x86_64_bnd_plt_entry): Renamed to ...
2763 (elf_x86_64_lazy_bnd_plt_entry): This.
2764 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2765 (elf_x86_64_non_lazy_plt_entry): This.
2766 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2767 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2768 (elf_x86_64_eh_frame_plt): Renamed to ...
2769 (elf_x86_64_eh_frame_lazy_plt): This.
2770 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2771 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2772 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2773 (elf_x86_64_eh_frame_non_lazy_plt): This.
2774 (elf_x86_64_lazy_plt_layout): New.
2775 (elf_x86_64_non_lazy_plt_layout): Likewise.
2776 (elf_x86_64_plt_layout): Likewise.
2777 (elf_x86_64_backend_data): Remove PLT layout information. Add
2778 os for target system.
2779 (GET_PLT_ENTRY_SIZE): Removed.
2780 (elf_x86_64_lazy_plt): New.
2781 (elf_x86_64_non_lazy_plt): Likewise.
2782 (elf_x86_64_lazy_bnd_plt): Likewise.
2783 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2784 (elf_x86-64_arch_bed): Updated.
2785 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2786 (elf_x86_64_create_dynamic_sections): Removed.
2787 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2788 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2789 (elf_x86-64_adjust_dynamic_symbol): Updated.
2790 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2791 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2792 size for PLT0 if there is no PLT0. Get plt_entry_size from
2793 non_lazy_plt for non-lazy PLT entries.
2794 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2795 from non_lazy_plt for non-lazy PLT entries.
2796 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2797 if there is no PLT0.
2798 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2799 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2800 entries with non-lazy PLT layout. Don't fill the second and third
2801 slots in the PLT entry if there is no PLT0.
2802 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2803 if there is no PLT0. Set sh_entsize on the .plt.got section.
2804 (compare_relocs): New.
2805 (elf_x86_64_plt_type): Likewise.
2806 (elf_x86_64_plt): Likewise.
2807 (elf_x86_64_nacl_plt): New. Forward declaration.
2808 (elf_x86_64_get_plt_sym_val): Removed.
2809 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2810 against all dynamic relocations.
2811 (elf_x86_64_link_setup_gnu_properties): New function.
2812 (elf_backend_create_dynamic_sections): Updated.
2813 (elf_backend_setup_gnu_properties): New.
2814 (elf_x86_64_nacl_plt): New.
2815 (elf_x86_64_nacl_arch_bed): Updated.
2817 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2819 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2820 (LAZY_PLT_ENTRY_SIZE): This.
2821 (NON_LAZY_PLT_ENTRY_SIZE): New.
2822 (elf_i386_plt0_entry): Renamed to ...
2823 (elf_i386_lazy_plt0_entry): This.
2824 (elf_i386_plt_entry): Renamed to ...
2825 (elf_i386_lazy_plt_entry): This.
2826 (elf_i386_pic_plt0_entry): Renamed to ...
2827 (elf_i386_pic_lazy_plt0_entry): This.
2828 (elf_i386_pic_plt_entry): Renamed to ...
2829 (elf_i386_pic_lazy_plt_entry): This.
2830 (elf_i386_got_plt_entry): Renamed to ...
2831 (elf_i386_non_lazy_plt_entry): This.
2832 (elf_i386_pic_got_plt_entry): Renamed to ...
2833 (elf_i386_pic_non_lazy_plt_entry): This.
2834 (elf_i386_eh_frame_plt): Renamed to ...
2835 (elf_i386_eh_frame_lazy_plt): This.
2836 (elf_i386_eh_frame_plt_got): Renamed to ...
2837 (elf_i386_eh_frame_non_lazy_plt): This.
2838 (elf_i386_plt_layout): Renamed to ...
2839 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2840 eh_frame_plt_got_size.
2841 (elf_i386_non_lazy_plt_layout): New.
2842 (elf_i386_plt_layout): Likewise.
2843 (elf_i386_non_lazy_plt): Likewise.
2844 (GET_PLT_ENTRY_SIZE): Removed.
2845 (elf_i386_plt): Renamed to ...
2846 (elf_i386_lazy_plt): This.
2847 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2848 (elf_i386_arch_bed): Updated.
2849 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2850 (elf_i386_create_dynamic_sections): Removed.
2851 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2852 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2853 (elf_i386_adjust_dynamic_symbol): Updated.
2854 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2855 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2856 size for PLT0 if there is no PLT0.
2857 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2858 output section is discarded only if GOT isn't empty.
2859 (elf_i386_relocate_section): Updated. Properly get PLT index
2860 if there is no PLT0.
2861 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2862 second and third slots in the PLT entry if there is no PLT0.
2863 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2864 if there is no PLT0. Set sh_entsize on the .plt.got section.
2865 (elf_i386_nacl_plt): Forward declaration.
2866 (elf_i386_get_plt_sym_val): Removed.
2867 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2868 against all dynamic relocations.
2869 (elf_i386_link_setup_gnu_properties): New function.
2870 (elf_backend_create_dynamic_sections): Updated.
2871 (elf_backend_setup_gnu_properties): New.
2872 (elf_i386_nacl_plt): Updated.
2873 (elf_i386_nacl_arch_bed): Likewise.
2874 (elf_i386_vxworks_arch_bed): Likewise.
2876 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2878 * elflink.c (elf_output_implib): Remove executable flag from import
2880 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2881 library is a relocatable object file.
2883 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2886 * elf32-avr.c (avr_should_move_sym): New function.
2887 (avr_should_reduce_sym_size): Likewise.
2888 (avr_should_increase_sym_size): Likewise.
2889 (elf32_avr_relax_delete_bytes): Adjust symbol values
2890 and sizes by calling new functions.
2892 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2894 * config.bfd (riscv32-*): Enable rv64.
2896 2017-05-02 Alan Modra <amodra@gmail.com>
2899 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2900 rather than h->root.type == bfd_link_hash_new.
2901 (bfd_elf_record_link_assignment): Similarly, call
2902 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2904 2017-04-29 Alan Modra <amodra@gmail.com>
2907 * reloc.c (reloc_offset_in_range): New function.
2908 (bfd_perform_relocation, bfd_install_relocation): Use it.
2909 (_bfd_final_link_relocate): Likewise.
2911 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2913 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2914 before using .plt.got.
2915 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2917 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2919 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2920 instead of "+=" to update 0.
2922 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2924 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2925 .plt.got section here.
2926 (elf_i386_check_relocs): Don't create the .plt.got section.
2927 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2928 the .plt.got and .plt.bnd sections here.
2929 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2932 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2934 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2936 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2937 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2938 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2939 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2942 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2944 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2946 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2947 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2948 the first relocatable ELF input with GNU properties.
2950 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2952 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2953 VxWorks for non-PIC.
2955 2017-04-27 Alan Modra <amodra@gmail.com>
2957 * elf-bfd.h (struct elf_backend_data): Make asection param of
2958 elf_backend_eh_frame_address_size const.
2959 (_bfd_elf_eh_frame_address_size): Likewise.
2960 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2961 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2962 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2963 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2964 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2965 (next_cie_fde_offset): Constify params.
2966 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2968 2017-04-27 Alan Modra <amodra@gmail.com>
2970 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2971 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2972 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2974 (offset_adjust): New function.
2975 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2976 (adjust_eh_frame_local_symbols): Likewise.
2977 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2978 after changing anything. Return true if anything changed.
2979 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2980 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2982 2017-04-27 Alan Modra <amodra@gmail.com>
2984 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2987 2017-04-27 Alan Modra <amodra@gmail.com>
2989 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2990 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2991 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2992 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2993 for undef and undefweak dyn_relocs.
2994 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2995 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2996 (allocate_got, allocate_dynrelocs): Likewise.
2997 (ppc64_elf_relocate_section): Likewise.
2999 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3001 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3002 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3003 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3004 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3006 2017-04-26 Nick Clifton <nickc@redhat.com>
3009 * reloc.c (bfd_perform_relocation): Check for a negative address
3012 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3015 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3017 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3018 (elf_backend_always_renumber_dynsyms): Define.
3019 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3020 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3021 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3022 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3024 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3026 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3028 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3029 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3030 sections have been created.
3032 2017-04-26 Nick Clifton <nickc@redhat.com>
3035 * compress.c (bfd_init_section_compress_status): Check the return
3036 value from bfd_malloc.
3038 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3040 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3041 no_finish_dynamic_symbol.
3042 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3044 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3045 weak symbol, don't make it dynamic.
3046 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3047 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3048 relocation for GOT reference.
3049 (elf_x86_64_finish_dynamic_symbol): Abort if
3050 no_finish_dynamic_symbol isn't 0.
3052 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3055 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3056 undefined weak symbol, don't make it dynamic.
3057 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3058 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3059 relocation for R_386_GOT32.
3061 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3064 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3066 2017-04-23 Alan Modra <amodra@gmail.com>
3069 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3070 * elf.c (lcomm_sym): New.
3071 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3072 * bfd-in2.h: Regenerate.
3074 2017-04-23 Alan Modra <amodra@gmail.com>
3077 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3078 parameters and comment.
3079 (_bfd_elf_get_reloc_section): Delete.
3080 (_bfd_elf_plt_get_reloc_section): Declare.
3081 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3082 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3084 (_bfd_elf_get_reloc_section): ..here. Delete.
3085 (assign_section_numbers): Call elf_get_reloc_section.
3086 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3087 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3089 2017-04-23 Alan Modra <amodra@gmail.com>
3092 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3095 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3098 * elf32-i386.c (elf_i386_link_hash_entry): Add
3099 no_finish_dynamic_symbol.
3100 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3101 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3102 symbol, don't make it dynamic in PIE.
3103 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3104 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3105 relocation for R_386_GOT32
3106 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3109 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3113 * elflink.c (elf_link_add_object_symbols): Require
3114 --no-dynamic-linker with -E/--dynamic-list when creating
3117 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3119 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3122 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3124 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3125 dynamic symbol sorting.
3127 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3130 * elflink.c (elf_link_add_object_symbols): Preserve
3131 dynamic_ref_after_ir_def when restoring the symbol table for
3132 unneeded dynamic object.
3134 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3137 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3138 on on undefined IFUNC symbol in the second PLT.
3140 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3142 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3144 2017-04-19 Alan Modra <amodra@gmail.com>
3146 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3147 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3148 * elf32-ppc.c:Formatting.
3149 (ensure_undefweak_dynamic): Don't make dynamic when
3150 info->dynamic_undefined_weak is zero.
3151 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3152 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3153 not default visibility. Discard undef and undefweak
3155 (ppc_elf_relocate_section): Adjust to suit.
3156 * elf64-ppc.c: Formatting.
3157 (ensure_undefweak_dynamic): Don't make dynamic when
3158 info->dynamic_undefined_weak is zero.
3159 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3160 info->dynamic_undefined_weak. Discard them earlier.
3162 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3165 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3166 before generating the version definition section.
3168 2017-04-17 Alan Modra <amodra@gmail.com>
3170 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3171 state when a regular object file defines a symbol with
3172 incompatible type to that defined by an earlier shared lib.
3174 2017-04-13 Alan Modra <amodra@gmail.com>
3176 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3178 * elf32-arm.c: Likewise.
3179 * elf32-i386.c: Likewise.
3180 * elf32-mep.c: Likewise.
3181 * elf64-ia64-vms.c: Likewise.
3182 * elf64-x86-64.c: Likewise.
3183 * elflink.c: Likewise.
3184 * elfnn-ia64.c: Likewise.
3185 * elfxx-mips.c: Likewise.
3187 2017-04-13 Alan Modra <amodra@gmail.com>
3189 * aoutx.h: Use %B and %A in error messages throughout file.
3190 * aout-cris.c: Likewise.
3191 * archive.c: Likewise.
3192 * binary.c: Likewise.
3193 * coff-rs6000.c: Likewise.
3194 * coff-tic4x.c: Likewise.
3195 * coffcode.h: Likewise.
3196 * coffgen.c: Likewise.
3197 * cofflink.c: Likewise.
3198 * coffswap.h: Likewise.
3199 * cpu-arm.c: Likewise.
3200 * elf-eh-frame.c: Likewise.
3201 * elf-m10300.c: Likewise.
3203 * elf32-arc.c: Likewise.
3204 * elf32-arm.c: Likewise.
3205 * elf32-bfin.c: Likewise.
3206 * elf32-frv.c: Likewise.
3207 * elf32-iq2000.c: Likewise.
3208 * elf32-m32c.c: Likewise.
3209 * elf32-microblaze.c: Likewise.
3210 * elf32-nds32.c: Likewise.
3211 * elf32-rl78.c: Likewise.
3212 * elf32-rx.c: Likewise.
3213 * elf32-score.c: Likewise.
3214 * elf32-score7.c: Likewise.
3215 * elf32-sh64.c: Likewise.
3216 * elf32-v850.c: Likewise.
3217 * elf32-vax.c: Likewise.
3218 * elf32-visium.c: Likewise.
3219 * elf64-ia64-vms.c: Likewise.
3220 * elf64-mmix.c: Likewise.
3221 * elf64-sh64.c: Likewise.
3222 * elfcode.h: Likewise.
3223 * elfnn-aarch64.c: Likewise.
3224 * elfnn-ia64.c: Likewise.
3225 * elfxx-mips.c: Likewise.
3226 * hpux-core.c: Likewise.
3229 * linker.c: Likewise.
3230 * merge.c: Likewise.
3232 * oasys.c: Likewise.
3233 * pdp11.c: Likewise.
3234 * peXXigen.c: Likewise.
3235 * rs6000-core.c: Likewise.
3236 * vms-alpha.c: Likewise.
3237 * xcofflink.c: Likewise.
3239 2017-04-13 Alan Modra <amodra@gmail.com>
3241 * bfd.c (PRINT_TYPE): Define.
3242 (_doprnt): New function.
3243 (error_handler_internal): Use _doprnt.
3244 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3245 calls in their natural order, throughout file.
3246 * coff-mcore.c: Likewise.
3247 * coff-ppc.c: Likewise.
3248 * coff-tic80.c: Likewise.
3249 * cofflink.c: Likewise.
3250 * elf-s390-common.c: Likewise.
3252 * elf32-arm.c: Likewise.
3253 * elf32-i386.c: Likewise.
3254 * elf32-m32r.c: Likewise.
3255 * elf32-msp430.c: Likewise.
3256 * elf32-spu.c: Likewise.
3257 * elf64-ia64-vms.c: Likewise.
3258 * elf64-sparc.c: Likewise.
3259 * elf64-x86-64.c: Likewise.
3260 * elflink.c: Likewise.
3261 * elfnn-aarch64.c: Likewise.
3262 * elfnn-ia64.c: Likewise.
3263 * elfxx-mips.c: Likewise.
3265 2017-04-13 Alan Modra <amodra@gmail.com>
3267 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3268 branch veneers" error. Fix double space and format message.
3269 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3270 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3272 2017-04-13 Alan Modra <amodra@gmail.com>
3274 * bfd-in2.h: Regenerate.
3276 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3278 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3279 extra `\n' in warning/error messages.
3280 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3281 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3283 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3285 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3286 processor-specific properties with generic ELF target vector.
3288 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3290 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3291 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3292 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3293 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3295 (link_hash_newfunc): Initialize has_got_reloc and
3297 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3299 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3301 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3303 (_bfd_sparc_elf_fixup_symbol): New function.
3304 (allocate_dynrelocs): Don't allocate space for dynamic
3305 relocations and discard relocations against resolved undefined
3306 weak symbols in executable. Don't make resolved undefined weak
3307 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3308 relocation against undefined weak symbols in PIE.
3309 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3310 relocations against resolved undefined weak symbols in PIE
3311 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3312 without ynamic PLT/GOT relocations for resolved undefined weak
3314 Don't generate dynamic relocation against resolved undefined
3315 weak symbol in executable.
3316 (pie_finish_undefweak_symbol): New function.
3317 (_bfd_sparc_elf_finish_dynamic_sections): Call
3318 pie_finish_undefweak_symbol on all symbols in PIE.
3319 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3320 (_bfd_sparc_elf_fixup_symbol): New function.
3322 2017-04-10 Nick Clifton <nickc@redhat.com>
3324 * config.bfd: Remove ns32k from obsolete list.
3326 2017-04-10 Alan Modra <amodra@gmail.com>
3329 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3330 (special_sections_i): Likewise for .init_array.
3331 (special_sections_p): Likewise for .preinit_array.
3333 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3337 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3338 ELF_COMMON_DEF_P for common symbols.
3339 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3340 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3341 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3342 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3343 07492f668d2173da7a2bda3707ff0985e0f460b6.
3345 2017-04-07 Pedro Alves <palves@redhat.com>
3347 * opncls.c (bfd_get_debug_link_info): Rename to...
3348 (bfd_get_debug_link_info_1): ... this. Change type of second
3349 parameter to void pointer. Adjust.
3350 (bfd_get_debug_link_info): Reimplement on top of
3351 bfd_get_debug_link_info_1.
3352 (separate_debug_file_exists, separate_alt_debug_file_exists):
3353 Change type of second parameter to void pointer. Adjust.
3354 (get_func_type, check_func_type): Change type of second parameter
3356 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3357 the callback functions instead of passing the address of a local.
3358 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3359 find_separate_debug_file.
3360 (get_alt_debug_link_info_shim): Change type of second parameter to
3361 void pointer. Adjust.
3362 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3363 find_separate_debug_file.
3364 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3365 of second parameter to void pointer. Adjust.
3366 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3367 pointer local to find_separate_debug_file.
3369 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3371 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3372 external symbols with a definition.
3373 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3375 2017-04-07 Alan Modra <amodra@gmail.com>
3377 * po/SRC-POTFILES.in: Regenerate.
3379 2017-04-05 Alan Modra <amodra@gmail.com>
3381 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3384 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3386 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3387 numbers for DataDirectory entry indicies passed to
3390 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3392 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3393 each GNU_MBIND section and align GNU_MBIND section to page size.
3394 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3395 segment for each GNU_MBIND section.
3396 (_bfd_elf_init_private_section_data): Copy sh_info from input
3397 for GNU_MBIND section.
3399 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3401 * elfnn-riscv.c (GP_NAME): Delete.
3402 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3403 (_bfd_riscv_relax_lui): Likewise.
3405 2017-04-04 Nick Clifton <nickc@redhat.com>
3408 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3410 (bfd_elf_final_link): Only initialize the extended symbol index
3411 section if there are extended symbol tables to list.
3413 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3415 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3416 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3417 * configure.ac (elf): Add elf-properties.lo.
3418 * Makefile.in: Regenerated.
3419 * configure: Likewise.
3420 * elf-bfd.h (elf_property_kind): New.
3421 (elf_property): Likewise.
3422 (elf_property_list): Likewise.
3423 (elf_properties): Likewise.
3424 (_bfd_elf_parse_gnu_properties): Likewise.
3425 (_bfd_elf_get_property): Likewise.
3426 (_bfd_elf_link_setup_gnu_properties): Likewise.
3427 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3428 and setup_gnu_properties.
3429 (elf_obj_tdata): Add properties.
3430 * elf-properties.c: New file.
3431 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3432 (elf_i386_merge_gnu_properties): Likewise.
3433 (elf_backend_parse_gnu_properties): Likewise.
3434 (elf_backend_merge_gnu_properties): Likewise.
3435 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3436 (elf_x86_64_merge_gnu_properties): Likewise.
3437 (elf_backend_parse_gnu_properties): Likewise.
3438 (elf_backend_merge_gnu_properties): Likewise.
3439 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3440 (elf_backend_parse_gnu_properties): Likewise.
3441 (elf_backend_setup_gnu_properties): Likewise.
3442 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3443 elf_backend_merge_gnu_properties and
3444 elf_backend_setup_gnu_properties.
3446 2017-03-30 Pip Cet <pipcet@gmail.com>
3448 * elf32-wasm32.c: Add relocation code, two relocs.
3449 * reloc.c: Add wasm32 relocations.
3450 * libbfd.h: Regenerate.
3451 * bfd-in2.h: Regenerate.
3452 * bfd/po/bfd.pot: Regenerate.
3454 2017-03-29 Nick Clifton <nickc@redhat.com>
3457 * coff-bfd.h (struct coff_section_data): Add new fields:
3458 saved_bias and bias.
3459 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3460 computed for PE binaries.
3461 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3464 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3467 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3468 to handle a local symbol with a hash-symbol-entry; without PLT.
3469 Add BFD_ASSERT for an incidental case with GOT entry present.
3470 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3471 isn't forced-or-set local.
3473 2017-03-27 Pip Cet <pipcet@gmail.com>
3475 * wasm-module.c: New file to support WebAssembly modules.
3476 * wasm-module.h: New file to support WebAssembly modules.
3477 * doc/webassembly.texi: Start documenting wasm-module.c.
3478 * config.bfd: Add wasm_vec.
3479 * targets.c: Likewise.
3480 * configure.ac: Likewise.
3481 * Makefile.am: Add entries for wasm-module.c.
3482 * Makefile.in: Regenerate.
3483 * configure: Regenerate.
3484 * po/SRC-POTFILES.in: Regenerate.
3486 2017-03-27 Pip Cet <pipcet@gmail.com>
3488 * cpu-wasm32.c: New file to support wasm32 architecture.
3489 * elf32-wasm32.c: New file to support wasm32 architecture.
3490 * Makefile.am: Add wasm32 architecture.
3491 * archures.c: Likewise.
3492 * config.bfd: Likewise.
3493 * configure.ac: Likewise.
3494 * targets.c: Likewise.
3495 * Makefile.in: Regenerate.
3496 * bfd-in2.h: Regenerate.
3497 * configure: Regenerate.
3498 * po/SRC-POTFILES.in: Regenerate.
3500 2017-03-20 Alan Modra <amodra@gmail.com>
3503 * elf64-ppc.c (compare_symbols): Stabilize sort.
3505 2017-03-18 Alan Modra <amodra@gmail.com>
3507 * elf64-ppc.c (struct ppc_link_hash_table): Add
3508 local_ifunc_resolver and maybe_local_ifunc_resolver.
3509 (ppc_build_one_stub): Set flags on emitting dynamic
3510 relocation to ifunc.
3511 (ppc64_elf_relocate_section): Likewise.
3512 (ppc64_elf_finish_dynamic_symbol): Likewise.
3513 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3514 local dynamic relocs to ifuncs.
3515 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3516 local_ifunc_resolver and maybe_local_ifunc_resolver.
3517 (ppc_elf_relocate_section): Set flag on emitting dynamic
3518 relocation to ifuncs.
3519 (ppc_elf_finish_dynamic_symbol): Likewise.
3520 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3521 dynamic relocs to ifuncs.
3523 2017-03-13 Nick Clifton <nickc@redhat.com>
3526 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3527 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3528 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3529 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3530 * bfd-in2.h: Regenerate.
3531 * libbfd.h: Regenerate.
3532 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3534 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3535 (elfNN_aarch64_howto_table): Likewise.
3536 (aarch64_tls_transition_without_check): Likewise.
3537 (aarch64_reloc_got_type): Likewise.
3538 (elfNN_aarch64_final_link_relocate): Likewise.
3539 (elfNN_aarch64_tls_relax): Likewise.
3540 (elfNN_aarch64_relocate_section): Likewise.
3541 (elfNN_aarch64_gc_sweep_hook): Likewise.
3542 (elfNN_aarch64_check_relocs): Likewise.
3543 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3544 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3546 2017-03-11 Alan Modra <amodra@gmail.com>
3548 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3549 parameter is in fact used. Whitespace fixes.
3550 * elf64-ppc.c: Likewise.
3552 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3554 * rs6000-core.c (CORE_NEW): Simplify macro when
3555 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3557 2017-03-07 Alan Modra <amodra@gmail.com>
3561 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3564 2017-03-05 Alan Modra <amodra@gmail.com>
3566 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3567 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3568 (next_cie_fde_offset): New function.
3569 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3570 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3571 four bytes. Align CIEs to four or eight bytes depending on
3572 per_encoding_aligned8. Align FDEs according to their encoding.
3573 Pad last FDE to output section alignment.
3574 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3576 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3577 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3578 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3580 2017-03-02 Martin Bickel <binutils@ineranves.de>
3583 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3584 empty segments which have a zero filesz, but a non-zero memsz.
3586 2017-03-02 Alan Modra <amodra@gmail.com>
3588 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3590 2017-02-28 Alan Modra <amodra@gmail.com>
3592 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3593 (ppc64_elf_relocate_section): Likewise.
3595 2017-02-28 Alan Modra <amodra@gmail.com>
3598 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3599 rather than elf32_nios2_hash_table or elf_hash_table.
3600 (create_got_section): Likewise.
3601 (nios2_elf32_finish_dynamic_symbol): Likewise.
3602 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3603 (nios2_elf32_size_dynamic_sections): Likewise.
3604 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3605 vars. Use htab equivalents directly instead. Don't create
3606 all dynamic sections on needing just the GOT. Use a goto
3607 rather than a fall-through with reloc test. Ensure
3608 htab->dynobj is set when making dynamic sreloc section.
3609 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3610 equivalent directly instead. Don't segfault on looking for
3611 .dynamic when dynamic sections have not been created. Don't
3612 segfault on .got.plt being discarded.
3613 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3614 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3615 fixme and another not so relevant comment.
3616 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3617 already set, set hash table dynobj on creating .sbss.
3619 2017-02-28 Alan Modra <amodra@gmail.com>
3621 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3622 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3623 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3624 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3625 (ppc64_elf_relocate_section): Likewise.
3626 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3627 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3628 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3629 * libbfd.h: Regenerate.
3630 * bfd-in2.h: Regenerate.
3632 2017-02-28 Alan Modra <amodra@gmail.com>
3634 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3635 dynamic .data.rel.ro read-only.
3636 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3637 rather than section flags when deciding where copy reloc goes.
3638 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3639 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3640 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3641 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3642 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3643 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3644 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3645 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3646 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3647 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3648 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3649 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3650 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3651 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3652 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3653 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3654 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3655 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3656 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3658 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3660 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3661 `jalr $0, $25' instruction encoding.
3663 2017-02-27 Nick Clifton <nickc@redhat.com>
3666 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3667 generating a seg-fault when encountering a symbol that has been
3668 deleted by garbage collection.
3670 2017-02-25 Alan Modra <amodra@gmail.com>
3672 * elf32-arc.c (struct dynamic_sections): Delete.
3673 (enum dyn_section_types): Delete.
3674 (dyn_section_names): Delete.
3675 (arc_create_dynamic_sections): Delete.
3676 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3677 segfault on discarded .rela.plt section.
3678 (elf_arc_size_dynamic_sections): Formatting. Don't call
3679 arc_create_dynamic_sections. Don't allocate memory for sections
3680 handled by the generic linker. Correct code finding relocs in
3681 read-only sections. Set SEC_EXCLUDE on zero size .got,
3682 .got.plt, and .dynbss sections. Do set .interp for pies.
3684 2017-02-24 Andrew Waterman <andrew@sifive.com>
3686 * elfnn-riscv.c (GP_NAME): New macro.
3687 (riscv_global_pointer_value): Use it.
3688 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3689 output section, consider only that section's alignment.
3691 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3693 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3694 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3695 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3696 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3698 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3700 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3701 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3704 2017-02-23 Alan Modra <amodra@gmail.com>
3707 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3709 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3710 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3713 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3716 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3717 processing ahead of the call to `elf_gc_sweep_symbol'.
3719 2017-02-22 Nick Clifton <nickc@redhat.com>
3722 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3723 created section 4-byte alignment.
3725 2017-02-22 Alan Modra <amodra@gmail.com>
3727 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3728 on .got or .plt output section being discarded by script.
3729 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3732 2017-02-21 Alan Modra <amodra@gmail.com>
3734 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3735 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3737 2017-02-20 Alan Modra <amodra@gmail.com>
3740 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3741 if DT_RELSZ/DT_RELASZ is zero.
3743 2017-02-17 Nick Clifton <nickc@redhat.com>
3745 * compress.c (bfd_get_full_section_contents): Remember to reduce
3746 compressed size by the sizeof the compression header when
3747 decompressing the contents.
3749 2017-02-17 Pedro Alves <palves@redhat.com>
3751 * srec.c (Chunk): Rename to ...
3752 (_bfd_srec_len): ... this.
3753 (S3Forced): Rename to ...
3754 (_bfd_srec_forceS3): ... this.
3755 * objcopy.c: Adjust all references.
3757 2017-02-17 Pedro Alves <palves@redhat.com>
3759 * archive.c (bsd_write_armap): Rename to ...
3760 (_bfd_bsd_write_armap): ... this.
3761 (coff_write_armap): Rename to ...
3762 (_bfd_coff_write_armap): ... this.
3763 * libbfd-in.h (bsd_write_armap): Rename to ...
3764 (_bfd_bsd_write_armap): ... this.
3765 (coff_write_armap): Rename to ...
3766 (_bfd_coff_write_armap): ... this.
3767 * aout-target.h, aout-tic30.c: Adjust all users.
3768 * libbfd.h: Regenerate.
3770 2017-02-17 Pedro Alves <palves@redhat.com>
3772 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3773 (warn_deprecated): Rename to ...
3774 (_bfd_warn_deprecated): ... this.
3775 * libbfd.c (warn_deprecated): Rename to ...
3776 (_bfd_warn_deprecated): ... this.
3777 * bfd-in2.h: Regenerate.
3779 2017-02-17 Pedro Alves <palves@redhat.com>
3781 * bfdio.c (real_ftell): Rename to ...
3782 (_bfd_real_ftell): ... this.
3783 (real_fseek): Rename to ...
3784 (_bfd_real_fseek): ... this.
3785 (real_fopen): Rename to ...
3786 (_bfd_real_fopen): ... this.
3787 * libbfd-in.h (real_ftell): Rename to ...
3788 (_bfd_real_ftell): ... this.
3789 (real_fseek): Rename to ...
3790 (_bfd_real_fseek): ... this.
3791 (real_fopen): Rename to ...
3792 (_bfd_real_fopen): ... this.
3793 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3794 * libbfd.h: Regenerate.
3796 2017-02-17 Pedro Alves <palves@redhat.com>
3798 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3799 * libbfd.c (read_unsigned_leb128): Rename to ...
3800 (_bfd_read_unsigned_leb128): ... this.
3801 (read_signed_leb128): Rename to ...
3802 (_bfd_read_signed_leb128): ... this.
3803 (safe_read_leb128): Rename to ...
3804 (_bfd_safe_read_leb128): ... this.
3805 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3806 (_bfd_read_unsigned_leb128): ... this.
3807 (read_signed_leb128): Rename to ...
3808 (_bfd_read_signed_leb128): ... this.
3809 (safe_read_leb128): Rename to ...
3810 (_bfd_safe_read_leb128): ... this.
3811 * libbfd.h: Renegerate.
3813 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3815 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3816 before trying to fine matching file and line information.
3818 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3820 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3821 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3822 not match current bfd, then reload debug information. Record bfd
3823 we're loading debug info for in the stash. If we have debug
3824 informatin in the cache then perform section placement before
3827 2017-02-16 Alan Modra <amodra@gmail.com>
3830 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3831 * elfxx-target.h (elf_backend_no_page_alias): Define.
3832 (elfNN_bed): Init new field.
3833 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3834 ensure PT_LOAD segment starts on a new page.
3835 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3837 2017-02-16 Alan Modra <amodra@gmail.com>
3840 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3843 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3845 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3846 * bfd-in2.h: Regenerated.
3848 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3851 * elf32-i386.c (elf_i386_relocate_section): Allow
3852 "lea foo@GOT, %reg" in PIC.
3854 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3857 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3858 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3859 error against local IFUNC symbol without a base register for
3862 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3864 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3865 `%P: %H:' with `info->callbacks->einfo'.
3866 (ppc_elf_relocate_section): Likewise.
3867 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3868 (ppc64_elf_edit_toc): Likewise.
3869 (ppc64_elf_relocate_section): Likewise.
3871 2017-02-14 Alan Modra <amodra@gmail.com>
3873 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3874 --gc-keep-exported, and test versioned field of sym rather than
3875 looking for @ in name.
3877 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3879 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3882 2017-02-13 Nick Clifton <nickc@redhat.com>
3885 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3888 2017-02-07 Andrew Waterman <andrew@sifive.com>
3890 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3891 entry size if PLT header is written.
3893 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3895 Fix sparc64 dynamic relocation processing to use the dynamic
3897 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3898 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3901 2017-02-03 Nick Clifton <nickc@redhat.com>
3904 * coffcode.h (coff_write_object_contents): Enlarge size of
3905 s_name_buf in order to avoid compile time warning about possible
3907 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3908 32-bits of insn value before printing into buffer.
3910 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3912 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3913 `max_local_dynindx'.
3914 (mips_elf_sort_hash_table): Handle it.
3915 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3916 symbols bump up `max_local_dynindx' rather than
3917 `max_non_got_dynindx'.
3919 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3921 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3922 `min_got_dynindx', `max_unref_got_dynindx' and
3923 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3924 (mips_elf_sort_hash_table): Adjust accordingly.
3926 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3928 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3929 to access the hash table.
3931 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3933 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3934 non-NULL `htab' to the beginning.
3936 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3938 * elflink.c (elf_gc_sweep): Wrap overlong line.
3940 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3942 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3943 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3944 * elfxx-mips.c (mips_elf_link_hash_table): Add
3945 `ignore_branch_isa' member.
3946 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3947 in branch relocation calculation as an error if
3948 `ignore_branch_isa' has been set.
3949 (_bfd_mips_elf_insn32): Rename to...
3950 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3951 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3952 Handle the new parameter.
3954 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3956 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3957 local variable dynobj.
3960 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3961 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3962 executable from read-only sections into sdynrelro.
3963 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3964 dynamic relocs in sdynrelro.
3965 (elf_backend_want_dynrelro): Define.
3967 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3969 * config.bfd (*-*-rtemsaout*): Mark as removed.
3971 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3973 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3974 (arm-*-rtems*): Move to (arm*-*-eabi*).
3975 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3976 (m68-*-rtems*): Move to (m68*-*-elf*).
3978 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3980 * config.bfd (*-*-rtemscoff*): Mark as removed.
3982 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3985 * elflink.c (bfd_elf_record_link_assignment): Revert last
3986 change and don't ever clear `forced_local'. Set `mark'
3988 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3990 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3991 (bfd_elf_size_dynamic_sections): ... here.
3992 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3993 and set `mark' instead in `__tls_get_addr_opt' processing.
3994 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3996 2017-01-24 Alan Modra <amodra@gmail.com>
3998 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3999 where dynamic relocs are preferable. Allow ifunc too.
4000 (ensure_undefweak_dynamic): New function.
4001 (allocate_dynrelocs): Use it here. Move plt handling last and
4002 don't make symbols dynamic, simplifying loop. Only make undef
4003 weak symbols with GOT entries dynamic. Correct condition
4004 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4005 comments. Remove goto.
4006 (ppc_elf_relocate_section): Correct test for using dynamic
4007 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4008 to suit. Set up explicit tls_index entries and implicit GOT
4009 tls_index entries resolvable at link time for
4010 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4011 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4012 (ensure_undefweak_dynamic): New function.
4013 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4014 with GOT entries dynamic. Remove unnecessary test of
4015 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4016 (ppc64_elf_relocate_section): Correct test for using dynamic
4017 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4018 to suit. Set up explicit tls_index entries and implicit GOT
4019 tls_index entries resolvable at link time for __tls_get_addr_opt.
4020 Simplify expression to clear mem for prelink.
4022 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4024 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4026 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4028 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4029 (elf_backend_hash_symbol): Define.
4031 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4034 * elflink.c (bfd_elf_record_link_assignment): Clear any
4035 `forced_local' marking for DSO symbols that are not being
4038 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4040 * elfnn-riscv.c (riscv_elf_object_p): New function.
4042 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4045 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4047 (elf_x86_64_check_relocs): Create .eh_frame section for the
4049 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4050 .eh_frame section for the .plt.bnd section.
4051 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4052 for the .plt.bnd section.
4054 2017-01-12 Nick Clifton <nickc@redhat.com>
4057 * opncls.c (find_separate_debug_file): Add include_dirs
4058 parameter. Only include the directory part of the bfd's filename
4059 in search paths if include_dirs is true. Add a couple of extra
4060 locations for looking for debug files.
4061 ( bfd_follow_gnu_debuglink): Update invocation of
4062 find_separate_debug_file.
4063 (bfd_follow_gnu_debugaltlink): Likewise.
4064 (get_build_id): New function: Finds the build-id of the given bfd.
4065 (get_build_id_name): New function: Computes the name of the
4066 separate debug info file for a bfd, based upon its build-id.
4067 (check_build_id_file): New function: Checks to see if a separate
4068 debug info file exists at the given location, and that its
4069 build-id matches that of the original bfd.
4070 (bfd_follow_build_id_debuglink): New function: Finds a separate
4071 debug info file for a given bfd by using the build-id method.
4072 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4073 method of locating a separate debug info file before using the
4075 * bfd-in2.h: Regenerate.
4077 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4080 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4081 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4082 elf_x86_64_eh_frame_plt_got.
4083 (elf_x86_64_size_dynamic_sections): Get unwind info from
4084 elf_x86_64_bnd_arch_bed for the BND PLT.
4086 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4088 * config.bfd: Add entries for i686-redox and x86_64-redox.
4090 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4092 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4094 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4095 .eh_frame section to 4 bytes for x32.
4096 (elf_x86_64_check_relocs): Likewise.
4098 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4101 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4102 (PLT_GOT_FDE_LENGTH): Likewise.
4103 (elf_i386_plt_layout): Add eh_frame_plt_got and
4104 eh_frame_plt_got_size.
4105 (elf_i386_plt): Updated.
4106 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4107 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4108 (elf_i386_size_dynamic_sections): Allocate and initialize
4109 .eh_frame section for .plt.got.
4110 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4112 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4113 eh_frame_plt_got_size.
4114 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4115 (PLT_GOT_FDE_LENGTH): Likewise.
4116 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4117 eh_frame_plt_got_size.
4118 (elf_x86_64_arch_bed): Updated.
4119 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4120 eh_frame_plt_got_size.
4121 (elf_x86_64_nacl_arch_bed): Likewise.
4122 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4123 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4124 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4125 .eh_frame section for .plt.got.
4126 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4129 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4131 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4132 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4134 2017-01-09 Nick Clifton <nickc@redhat.com>
4136 * dwarf2.c (lookup_address_in_function_table): Return early if
4137 there are no functions in the given comp unit, or if the high
4138 address of the last function in the comp unit is less than the
4141 2017-01-09 Nick Clifton <nickc@redhat.com>
4144 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4145 message if there are too many symbols to load.
4147 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4149 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4150 if relocs are cached.
4152 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4155 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4156 for R_MICROBLAZE_GOTOFF_64.
4158 2017-01-03 Nick Clifton <nickc@redhat.com>
4160 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4161 warning about using a possibly uninitialised variable.
4163 2017-01-02 Alan Modra <amodra@gmail.com>
4165 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4166 (allocate_plt_static, allocate_dynrelocs): Use it.
4168 2017-01-02 Alan Modra <amodra@gmail.com>
4170 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4171 .PARISC.unwind section.
4173 2017-01-02 Alan Modra <amodra@gmail.com>
4176 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4177 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4178 indirect to GOT pointer relative code edit.
4180 2017-01-02 Alan Modra <amodra@gmail.com>
4182 Update year range in copyright notice of all files.
4184 For older changes see ChangeLog-2016
4186 Copyright (C) 2017 Free Software Foundation, Inc.
4188 Copying and distribution of this file, with or without modification,
4189 are permitted in any medium without royalty provided the copyright
4190 notice and this notice are preserved.
4196 version-control: never