1 2017-09-28 Alan Modra <amodra@gmail.com>
4 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
5 a case where plugin_notice isn't called.
7 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
12 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
15 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
16 output_bfd to info->callbacks->minfo.
18 2017-09-26 Nick Clifton <nickc@redhat.com>
21 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
22 assertion failure if elf_x86_64_rtype_to_howto has already issued
25 2017-09-26 Alan Modra <amodra@gmail.com>
28 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
31 2017-09-26 Nick Clifton <nickc@redhat.com>
34 * dwarf2.c (read_formatted_entries): Fail early if we know that
35 the loop parsing data entries will overflow the end of the
38 2017-09-26 Alan Modra <amodra@gmail.com>
41 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
42 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
43 to stash->info_ptr_memory, and check die_ref is within that memory.
44 Set info_ptr_end correctly when another CU is refd. Check die_ref
45 for DW_FORM_ref4 etc. is within CU.
47 2017-09-26 Alan Modra <amodra@gmail.com>
50 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
51 (read_formatted_entries): Init "fe".
52 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
54 2017-09-26 Alan Modra <amodra@gmail.com>
57 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
60 2017-09-25 Alan Modra <amodra@gmail.com>
63 * dwarf1.c (parse_die): Sanity check pointer against section limit
65 (parse_line_table): Likewise.
67 2017-09-25 Alan Modra <amodra@gmail.com>
70 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
72 (parse_comp_unit): Likewise.
74 2017-09-25 Alan Modra <amodra@gmail.com>
77 * dwarf2.c (read_formatted_entries): Error on format_count zero.
79 2017-09-24 Alan Modra <amodra@gmail.com>
82 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
83 within section bounds.
85 2017-09-24 Alan Modra <amodra@gmail.com>
88 * dwarf2.c (decode_line_info): Properly free line sequences on error.
90 2017-09-24 Alan Modra <amodra@gmail.com>
93 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
94 pname param. Return status. Make name const. Don't abort,
95 return an error. Formatting. Exit if current info_ptr matches
96 orig_info_ptr. Update callers.
97 (scan_unit_for_symbols): Start at nesting_level of zero. Make
98 nested_funcs an array of structs for extensibility. Formatting.
100 2017-09-24 Alan Modra <amodra@gmail.com>
103 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
104 rather than dividing by zero.
106 2017-09-24 Alan Modra <amodra@gmail.com>
109 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
111 2017-09-24 Alan Modra <amodra@gmail.com>
114 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
116 2017-09-24 Alan Modra <amodra@gmail.com>
119 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
120 SHT_GNU_verneed section for sanity. Don't zalloc memory for
123 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
126 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
129 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
132 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
133 -1 if bfd_canonicalize_dynamic_reloc returns 0.
135 2017-09-22 Pedro Alves <palves@redhat.com>
136 Alan Modra <amodra@gmail.com>
138 * version.h: Add comment.
140 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
142 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
143 NT_S390_GS_BC, correct the previously swapped invocations of
144 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
146 2017-09-19 Alan Modra <amodra@gmail.com>
149 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
152 2017-09-19 Alan Modra <amodra@gmail.com>
155 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
156 symbols before calculating verrefs. Don't renumber dynsyms
157 after gc. Exclude .gnu.version when zero or one dynsym.
158 Localize some vars and reindent.
160 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
163 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
164 return from bfd_canonicalize_dynamic_reloc.
166 2017-09-15 Alan Modra <amodra@gmail.com>
169 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
170 overflows bfd_size_type.
172 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
175 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
176 to indicate if conversion is performed.
177 (elf_i386_check_relocs): Cache section contents and relocations
178 if conversion is performed.
179 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
180 contents and relocations if conversion is performed.
182 2017-09-14 Nick Clifton <nickc@redhat.com>
185 * peXXigen.c (pe_print_idata): Extend check for HintName vector
188 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
190 * elfxx-x86.h: Fix a typo in comments.
192 2017-09-09 Kamil Rytarowski <n54@gmx.com>
194 * elf32-nds32.c: Rename __BIT() to N32_BIT().
196 2017-09-09 Alan Modra <amodra@gmail.com>
198 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
201 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
203 * elf32-i386.c (elf_i386_relocate_section): Update usage of
204 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
205 (elf_i386_finish_dynamic_symbol): Likewise.
206 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
207 (elf_x86_64_finish_dynamic_symbol): Likewise.
208 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
209 (_bfd_x86_elf_fixup_symbol): Likewise.
211 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
213 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
214 check has_non_got_reloc.
216 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
219 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
220 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
221 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
222 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
223 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
224 and linker_def on __ehdr_start if it is referenced and not
226 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
227 and return TRUE when building executable, if a symbol has
228 non-GOT/non-PLT relocations in text section or there is no
230 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
232 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
234 * elfxx-x86.h: Update comments.
236 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
238 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
239 elf_x86_plt_layout_table with elf_x86_init_table.
240 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
242 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
244 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
245 (elf_x86_init_table): This.
246 (_bfd_x86_elf_link_setup_gnu_properties): Replace
247 elf_x86_plt_layout_table with elf_x86_init_table.
249 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
251 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
252 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
253 * configure: Regenerated.
254 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
255 and r_sym fields of plt_layout.
256 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
258 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
259 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
260 r_info nor r_sym fields.
261 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
263 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
265 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
267 * (_bfd_riscv_relax_align): Call bfd_set_error and
268 print an error message when unable to relax a .align directive.
270 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
272 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
273 (riscv_record_pcrel_hi_reloc): Add absolute argument.
274 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
275 R_RISCV_PCREL_HI20 relocs, and pass the result to
276 riscv_record_pcrel_hi_reloc.
278 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
280 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
281 r_type_p. Remove the converted argument. Replace
282 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
283 the new relocation type via r_type_p.
284 (elf_i386_relocate_section): Likewise.
285 (elf_i386_finish_dynamic_symbol): Likewise.
286 (need_convert_load): Removed.
287 (check_relocs_failed): Updated.
288 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
289 instead of setting need_convert_load.
290 (_bfd_i386_elf_convert_load): Removed.
291 * elf64-x86-64.c (need_convert_load): Removed.
292 (check_relocs_failed): Updated.
293 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
294 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
295 Return the new relocation type via r_type_p.
296 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
297 instead of setting need_convert_load.
298 (elf_x86_64_check_relocs): Don't check PIC if relocation has
300 (_bfd_x86_64_elf_convert_load): Removed.
301 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
302 with SYMBOL_REFERENCES_LOCAL_P.
303 (elf_x86_64_finish_dynamic_symbol): Likewise.
304 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
306 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
307 (_bfd_x86_elf_link_symbol_references_local): New function.
308 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
309 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
310 SYMBOL_REFERENCES_LOCAL_P.
311 (elf_x86_link_hash_entry): Add local_ref.
312 (elf_x86_link_hash_table): Remove convert_load.
313 (_bfd_i386_elf_convert_load): Removed.
314 (_bfd_x86_64_elf_convert_load): Likewise.
315 (_bfd_x86_elf_link_symbol_references_local): New.
317 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
319 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
320 (elf_x86_64_info_to_howto): Get the real relocation type by
321 masking out R_X86_64_converted_reloc_bit.
322 (elf_x86_64_check_tls_transition): Get the real relocation type
323 by masking out R_X86_64_converted_reloc_bit.
324 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
325 instead of setting converted_reloc.
326 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
327 instead of converted_reloc. Get the real relocation type by
328 masking out R_X86_64_converted_reloc_bit.
329 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
330 R_X86_64_converted_reloc_bit is valid.
331 * elfxx-x86.h (converted_reloc): Removed.
333 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
335 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
336 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
337 to get the relocation type again.
338 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
339 r_type when calling elf_x86_64_tls_transition. Don't use
340 ELF32_R_TYPE to get the relocation type again.
342 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
344 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
347 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
349 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
350 argument. Don't check relocation overflow. Avoid relocation
351 overflow if --no-relax is used. Set converted_reloc on symbol
352 if a GOTPCREL relocation is converted.
353 (elf_x86_64_relocate_section): Issue a fatal error and suggest
354 --no-relax if GOTPCREL relocation conversion leads to relocation
356 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
358 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
359 Edmar Wienskoski <edmar.wienskoski@nxp.com
361 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
362 (ppc_elf_check_relocs): Handle it.
363 (ppc_elf_vle_split20): New function.
364 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
366 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
369 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
370 for x86-64 if GOT_TLS_GDESC_P is true.
372 2017-09-03 Alan Modra <amodra@gmail.com>
375 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
377 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
379 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
380 tls_get_addr for x86-64 in one place.
382 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
384 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
385 with elfxx-x86.lo for 64-bit BFD.
386 * configure: Regenerated.
388 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
390 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
391 (_bfd_i386_elf_convert_load): This. Remove static.
392 (elf_i386_size_dynamic_sections): Removed.
393 (elf_backend_size_dynamic_sections): Likewise.
394 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
395 (_bfd_x86_64_elf_convert_load): This. Remove static.
396 (elf_x86_64_size_dynamic_sections): Removed.
397 (elf_backend_size_dynamic_sections): Likewise.
398 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
399 (elf_x86_allocate_dynrelocs): This. Make it static.
400 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
401 (elf_x86_allocate_local_dynreloc): This. Make it static.
402 (elf_i386_is_reloc_section): New function.
403 (elf_x86_64_is_reloc_section): Likewise.
404 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
405 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
406 Rearrange got_entry_size initialization.
407 (_bfd_x86_elf_size_dynamic_sections): New function.
408 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
409 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
410 (_bfd_i386_elf_convert_load): New.
411 (_bfd_x86_64_elf_convert_load): Likewise.
412 (_bfd_x86_elf_size_dynamic_sections): Likewise.
413 (elf_backend_size_dynamic_sections): Likewise.
414 (_bfd_x86_elf_allocate_dynrelocs): Removed.
415 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
417 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
419 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
422 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
424 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
425 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
427 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
429 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
430 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
431 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
432 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
433 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
434 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
436 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
438 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
439 (elf_i386_allocate_local_dynrelocs): Likewise.
440 (elf_i386_size_dynamic_sections): Replace
441 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
442 with _bfd_x86_elf_allocate_dynrelocs and
443 _bfd_x86_elf_allocate_local_dynrelocs.
444 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
445 (elf_x86_64_allocate_local_dynrelocs): Likewise.
446 (elf_x86_64_size_dynamic_sections): Replace
447 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
448 with _bfd_x86_elf_allocate_dynrelocs and
449 _bfd_x86_elf_allocate_local_dynrelocs.
450 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
451 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
452 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
453 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
455 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
457 * elf32-i386.c (is_i386_elf): Removed.
458 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
459 (elf_i386_size_dynamic_sections): Likewise.
460 (elf_i386_relocate_section): Likewise.
461 * elf64-x86-64.c (is_x86_64_elf): Removed.
462 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
464 (elf_x86_64_size_dynamic_sections): Likewise.
465 (elf_x86_64_relocate_section): Likewise.
466 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
468 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
471 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
473 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
474 (elf_i386_allocate_dynrelocs): Replace
475 elf_i386_compute_jump_table_size with
476 elf_x86_compute_jump_table_size.
477 (elf_i386_size_dynamic_sections): Likewise.
478 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
479 (elf_x86_64_allocate_dynrelocs): Replace
480 elf_x86_64_compute_jump_table_size with
481 elf_x86_compute_jump_table_size.
482 (elf_x86_64_size_dynamic_sections): Likewise.
483 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
485 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
486 (elf_x86_compute_jump_table_size): New.
488 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
490 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
492 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
493 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
495 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
497 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
498 with htab->is_vxworks.
499 (elf_i386_size_dynamic_sections): Likewise.
500 (elf_i386_relocate_section): Likewise.
501 (elf_i386_finish_dynamic_symbol): Likewise.
502 (elf_i386_finish_dynamic_sections): Likewise.
504 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
507 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
508 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
509 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
510 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
511 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
512 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
513 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
515 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
518 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
519 ELF_COMMON_DEF_P for common symbols.
521 2017-09-02 Alan Modra <amodra@gmail.com>
523 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
524 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
525 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
527 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
529 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
530 (elf_backend_gc_mark_hook): Likewise.
531 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
532 (elf_backend_gc_mark_hook): Likewise.
533 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
534 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
535 (elf_backend_gc_mark_hook): Likewise.
537 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
539 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
540 (elf_backend_adjust_dynamic_symbol): Likewise.
541 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
542 (elf_backend_adjust_dynamic_symbol): Likewise.
543 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
544 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
545 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
546 (_bfd_x86_elf_adjust_dynamic_symbol): New.
547 (elf_backend_adjust_dynamic_symbol): Likewise.
549 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
551 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
554 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
556 * elf32-i386.c (elf_i386_mkobject): Removed.
557 (bfd_elf32_mkobject): Likewise.
558 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
559 (bfd_elf64_mkobject): Likewise.
560 (bfd_elf32_mkobject): Likewise.
561 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
562 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
563 (bfd_elf64_mkobject): Likewise.
564 (bfd_elf32_mkobject): Likewise.
566 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
568 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
569 Call _bfd_x86_elf_link_setup_gnu_properties.
570 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
571 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
573 (elf_x86_64_non_lazy_plt): Likewise.
574 (elf_x86_64_lazy_bnd_plt): Likewise.
575 (elf_x86_64_non_lazy_bnd_plt): Likewise.
576 (elf_x86_64_lazy_ibt_plt): Likewise.
577 (elf_x32_lazy_ibt_plt): Likewise.
578 (elf_x86_64_non_lazy_ibt_plt): Likewise.
579 (elf_x32_non_lazy_ibt_plt): Likewise.
580 (elf_x86_64_nacl_plt): Likewise.
581 (elf_x86_64_link_setup_gnu_properties): Updated. Call
582 _bfd_x86_elf_link_setup_gnu_properties.
583 * elfxx-x86.c: Include elf-vxworks.h".
584 (_bfd_x86_elf_link_setup_gnu_properties): New function.
585 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
586 comments for pic_plt0_entry and pic_plt_entry.
587 (elf_x86_non_lazy_plt_layout): Likewise.
588 (elf_x86_plt_layout_table): New.
589 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
591 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
594 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
595 .eh_frame section for the second PLT.
596 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
597 alignment of .eh_frame section for the second PLT.
599 2017-09-01 Nick Clifton <nickc@redhat.com>
602 * dwarf2.c (decode_line_info): Fix test for an overlong line info
605 2017-09-01 Nick Clifton <nickc@redhat.com>
608 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
609 attribute buffer is NUL terminated.
611 2017-08-31 Nick Clifton <nickc@redhat.com>
614 * dwarf2.c (read_section): If necessary add a terminating NUL byte
615 to dwarf string sections.
617 2017-08-31 Alan Modra <amodra@gmail.com>
619 * po/SRC-POTFILES.in: Regenerate.
621 2017-08-31 Alan Modra <amodra@gmail.com>
623 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
624 for a section containing just a terminator. Allow multiple
625 terminators at end of section.
626 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
627 sections when not adding alignment. Assert on terminator in
630 2017-08-31 Alan Modra <amodra@gmail.com>
634 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
637 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
639 * configure.ac (bfd_backends): Add elf64.lo together with
640 elfxx-x86.lo for 64-bit BFD.
641 * configure: Regenerated.
643 2017-08-31 James Bowman <james.bowman@ftdichip.com>
645 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
648 2017-08-31 Alan Modra <amodra@gmail.com>
651 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
652 before _close_and_cleanup. Call iovec->bclose after.
653 (bfd_close): Remove code common to, and call, bfd_close_all_done.
655 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
657 * elf32-i386.c (elf_i386_plt_type): Removed.
658 (elf_i386_plt): Likewise.
659 (elf_i386_get_synthetic_symtab): Updated. Call
660 _bfd_x86_elf_get_synthetic_symtab.
661 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
662 (elf_x86_64_plt): Likewise.
663 (elf_x86_64_get_synthetic_symtab): Updated. Call
664 _bfd_x86_elf_get_synthetic_symtab.
665 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
666 (elf_x86_64_get_plt_got_vma): Likewise.
667 (elf_i386_valid_plt_reloc_p): Likewise.
668 (elf_x86_64_valid_plt_reloc_p): Likewise.
669 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
670 * elfxx-x86.h (elf_x86_plt_type): New.
671 (elf_x86_plt): Likewise.
672 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
674 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
676 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
677 target_id instead of elf_machine_code.
679 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
681 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
682 (elf_i386_lazy_plt_layout): Likewise.
683 (elf_i386_non_lazy_plt_layout): Likewise.
684 (elf_i386_plt_layout): Likewise.
685 (elf_i386_link_hash_table): Likewise.
686 (elf_i386_next_tls_desc_index): Likewise.
687 (elf_i386_srelplt2): Likewise.
688 (elf_i386_plt): Likewise.
689 (elf_i386_lazy_plt): Likewise.
690 (elf_i386_non_lazy_plt): Likewise.
691 (elf_i386_link_hash_table_create): Likewise.
692 (bfd_elf32_bfd_link_hash_table_create): Likewise.
693 (elf_i386_lazy_plt): Updated.
694 (elf_i386_non_lazy_plt): Likewise.
695 (elf_i386_lazy_ibt_plt): Likewise.
696 (elf_i386_non_lazy_ibt_plt): Likewise.
697 (elf_i386_allocate_dynrelocs): Likewise.
698 (elf_i386_size_dynamic_sections): Likewise.
699 (elf_i386_relocate_section): Likewise.
700 (elf_i386_finish_dynamic_symbol): Likewise.
701 (elf_i386_finish_dynamic_sections): Likewise.
702 (elf_i386_get_synthetic_symtab): Likewise.
703 (elf_i386_link_setup_gnu_properties): Likewise.
704 (elf_i386_nacl_plt): Likewise.
705 * elf64-x86-64.c (ABI_64_P): Removed.
706 (ELF64_DYNAMIC_INTERPRETER): Likewise.
707 (ELF32_DYNAMIC_INTERPRETER): Likewise.
708 (elf_x86_64_lazy_plt_layout): Likewise.
709 (elf_x86_64_non_lazy_plt_layout): Likewise.
710 (elf_x86_64_plt_layout): Likewise.
711 (elf_x86_64_link_hash_table): Likewise.
712 (elf_x86_64_plt): Likewise.
713 (elf_x86_64_lazy_plt): Likewise.
714 (elf_x86_64_non_lazy_plt): Likewise.
715 (elf_x86_64_link_hash_table_create): Likewise.
716 (bfd_elf64_bfd_link_hash_table_create): Likewise.
717 (bfd_elf32_bfd_link_hash_table_create): Likewise.
718 (elf_x86_64_lazy_plt): Updated.
719 (elf_x86_64_non_lazy_plt): Likewise.
720 (elf_x86_64_lazy_bnd_plt): Likewise.
721 (elf_x86_64_non_lazy_bnd_plt): Likewise.
722 (elf_x86_64_lazy_ibt_plt): Likewise.
723 (elf_x32_lazy_ibt_plt): Likewise.
724 (elf_x86_64_non_lazy_ibt_plt): Likewise.
725 (elf_x32_non_lazy_ibt_plt): Likewise.
726 (elf_x86_64_allocate_dynrelocs): Likewise.
727 (elf_x86_64_size_dynamic_sections): Likewise.
728 (elf_x86_64_relocate_section): Likewise.
729 (elf_x86_64_finish_dynamic_symbol): Likewise.
730 (elf_x86_64_finish_dynamic_sections): Likewise.
731 (elf_x86_64_get_synthetic_symtab): Likewise.
732 (elf_x86_64_link_setup_gnu_properties): Likewise.
733 (elf_x86_64_nacl_plt): Likewise.
734 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
736 (ELF32_DYNAMIC_INTERPRETER): New.
737 (ELF64_DYNAMIC_INTERPRETER): Likewise.
738 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
739 (_bfd_x86_elf_link_hash_table_create): Likewise.
740 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
741 (elf_x86_link_hash_table_free): This. Make it static.
742 * elfxx-x86.h: Don't include "objalloc.h".
744 (elf_x86_lazy_plt_layout): Likewise.
745 (elf_x86_non_lazy_plt_layout): Likewise.
746 (elf_x86_plt_layout): Likewise.
747 (_bfd_x86_elf_link_hash_table_create): Likewise.
748 (bfd_elf64_bfd_link_hash_table_create): Likewise.
749 (bfd_elf32_bfd_link_hash_table_create): Likewise.
750 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
751 srelplt2 and next_tls_desc_index.
752 (_bfd_x86_elf_link_hash_table_free): Removed.
754 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
756 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
757 branch offset interpretation.
759 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
762 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
764 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
766 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
767 (elf_x86_64_srelplt2): Likewise.
769 2017-08-30 Alan Modra <amodra@gmail.com>
771 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
772 (ppc64_elf_tls_optimize): Set it.
773 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
774 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
775 addis would add zero.
776 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
777 (ppc_elf_tls_optimize): Set it.
778 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
779 insn on TPREL16_LO relocs to use r2 when addis would add zero.
781 2017-08-30 Alan Modra <amodra@gmail.com>
783 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
784 __tls_get_addr call sequences to LE, don't move the addi down
785 to the nop. Replace the bl with addi and leave the nop alone.
787 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
789 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
791 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
793 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
795 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
797 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
798 (BFD64_BACKENDS): Likewise.
799 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
800 (BFD64_BACKENDS_CFILES): Likewise.
801 * Makefile.in: Regenerated.
802 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
803 elf32-i386.lo and elf64-x86-64.lo.
804 * configure: Regenerated.
805 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
806 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
807 "objalloc.h" and "hashtab.h".
808 (ELIMINATE_COPY_RELOCS): Removed.
809 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
810 (SYMBOL_NO_COPYRELOC): Likewise.
811 (elf_i386_link_hash_entry): Likewise.
812 (GOT_UNKNOWN): Likewise.
813 (GOT_NORMAL): Likewise.
814 (GOT_TLS_GD): Likewise.
815 (elf_i386_hash_entry): Likewise.
816 (elf_i386_obj_tdata): Likewise.
817 (elf_i386_tdata): Likewise.
818 (elf_i386_local_got_tls_type): Likewise.
819 (elf_i386_local_tlsdesc_gotent): Likewise.
820 (elf_i386_hash_table): Likewise.
821 (elf_i386_link_hash_newfunc): Likewise.
822 (elf_i386_local_htab_hash): Likewise.
823 (elf_i386_local_htab_eq): Likewise.
824 (elf_i386_get_local_sym_hash): Likewise.
825 (elf_i386_link_hash_table_free): Likewise.
826 (elf_i386_copy_indirect_symbol): Likewise.
827 (elf_i386_fixup_symbol): Likewise.
828 (elf_i386_readonly_dynrelocs): Likewise.
829 (elf_i386_always_size_sections): Likewise.
830 (elf_i386_set_tls_module_base): Likewise.
831 (elf_i386_dtpoff_base): Likewise.
832 (compare_relocs): Likewise.
833 (elf_i386_hash_symbol): Likewise.
834 (elf_i386_parse_gnu_properties): Likewise.
835 (elf_i386_merge_gnu_properties): Likewise.
836 (elf_i386_link_check_relocs): Likewise.
837 (elf_i386_merge_symbol_attribute): Likewise.
838 (bfd_elf32_bfd_link_check_relocs): Likewise.
839 (elf_backend_copy_indirect_symbol): Likewise.
840 (elf_backend_always_size_sections): Likewise.
841 (elf_backend_omit_section_dynsym): Likewise.
842 (elf_backend_hash_symbol): Likewise.
843 (elf_backend_fixup_symbol): Likewise.
844 (elf_backend_parse_gnu_properties): Likewise.
845 (elf_backend_merge_gnu_properties): Likewise.
846 (elf_backend_merge_symbol_attribute): Likewise.
847 (elf_i386_mkobject): Updated.
848 (elf_i386_link_hash_table_create): Likewise.
849 (elf_i386_check_tls_transition): Likewise.
850 (elf_i386_tls_transition): Likewise.
851 (elf_i386_convert_load_reloc): Likewise.
852 (elf_i386_check_relocs): Likewise.
853 (elf_i386_adjust_dynamic_symbol): Likewise.
854 (elf_i386_allocate_dynrelocs): Likewise.
855 (elf_i386_convert_load): Likewise.
856 (elf_i386_size_dynamic_sections): Likewise.
857 (elf_i386_relocate_section): Likewise.
858 (elf_i386_finish_dynamic_symbol ): Likewise.
859 (elf_i386_finish_dynamic_sections): Likewise.
860 (elf_i386_output_arch_local_syms): Likewise.
861 (elf_i386_get_synthetic_symtab): Likewise.
862 (elf_i386_link_setup_gnu_properties): Likewise.
863 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
864 of elf_link_hash_table, as base.
865 (elf_i386_next_tls_desc_index): New.
866 (elf_i386_srelplt2): Likewise.
867 (elf_i386_plt): Likewise.
868 (elf_i386_lazy_plt): Likewise.
869 (elf_i386_non_lazy_plt): Likewise.
870 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
871 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
872 "objalloc.h" and "hashtab.h".
873 (ELIMINATE_COPY_RELOCS): Removed.
874 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
875 (SYMBOL_NO_COPYRELOC): Likewise.
876 (elf_x86_64_link_hash_entry): Likewise.
877 (GOT_UNKNOWN): Likewise.
878 (GOT_NORMAL): Likewise.
879 (GOT_TLS_GD): Likewise.
880 (elf_x86_64_hash_entry): Likewise.
881 (elf_x86_64_obj_tdata): Likewise.
882 (elf_x86_64_tdata): Likewise.
883 (elf_x86_64_local_got_tls_type): Likewise.
884 (elf_x86_64_local_tlsdesc_gotent): Likewise.
885 (elf_x86_64_hash_table): Likewise.
886 (elf_x86_64_link_hash_newfunc): Likewise.
887 (elf_x86_64_local_htab_hash): Likewise.
888 (elf_x86_64_local_htab_eq): Likewise.
889 (elf_x86_64_get_local_sym_hash): Likewise.
890 (elf_x86_64_link_hash_table_free): Likewise.
891 (elf_x86_64_copy_indirect_symbol): Likewise.
892 (elf_x86_64_fixup_symbol): Likewise.
893 (elf_x86_64_readonly_dynrelocs): Likewise.
894 (elf_x86_64_always_size_sections): Likewise.
895 (elf_x86_64_set_tls_module_base): Likewise.
896 (elf_x86_64_dtpoff_base): Likewise.
897 (compare_relocs): Likewise.
898 (elf_x86_64_merge_symbol_attribute): Likewise.
899 (elf_x86_64_hash_symbol): Likewise.
900 (elf_x86_64_parse_gnu_properties): Likewise.
901 (elf_x86_64_merge_gnu_properties): Likewise.
902 (elf_x86_64_link_check_relocs): Likewise.
903 (elf_backend_copy_indirect_symbol): Likewise.
904 (elf_backend_always_size_sections): Likewise.
905 (bfd_elf64_bfd_link_check_relocs): Likewise.
906 (elf_backend_merge_symbol_attribute): Likewise.
907 (elf_backend_hash_symbol): Likewise.
908 (elf_backend_omit_section_dynsym): Likewise.
909 (elf_backend_fixup_symbol): Likewise.
910 (elf_backend_parse_gnu_properties): Likewise.
911 (elf_backend_merge_gnu_properties): Likewise.
912 (bfd_elf32_bfd_link_check_relocs): Likewise.
913 (elf_x86_64_mkobject): Updated.
914 (elf_x86_64_link_hash_table_create): Likewise.
915 (elf_x86_64_check_tls_transition): Likewise.
916 (elf_x86_64_tls_transition): Likewise.
917 (elf_x86_64_convert_load_reloc): Likewise.
918 (elf_x86_64_check_relocs): Likewise.
919 (elf_x86_64_adjust_dynamic_symbol): Likewise.
920 (elf_x86_64_allocate_dynrelocs): Likewise.
921 (elf_x86_64_convert_load): Likewise.
922 (elf_x86_64_size_dynamic_sections): Likewise.
923 (elf_x86_64_relocate_section): Likewise.
924 (elf_x86_64_finish_dynamic_symbol ): Likewise.
925 (elf_x86_64_finish_dynamic_sections): Likewise.
926 (elf_x86_64_output_arch_local_syms): Likewise.
927 (elf_x86_64_get_synthetic_symtab): Likewise.
928 (elf_x86_64_link_setup_gnu_properties): Likewise.
929 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
930 instead of elf_link_hash_table, as base.
931 (elf_x86_64_next_tls_desc_index): New.
932 (elf_x86_64_srelplt2): Likewise.
933 (elf_x86_64_plt): Likewise.
934 (elf_x86_64_lazy_plt): Likewise.
935 (elf_x86_64_non_lazy_plt): Likewise.
936 * elfxx-x86.c: New file.
937 * elfxx-x86.h: Likewise.
939 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
941 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
943 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
945 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
947 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
948 sections before checking dynamic relocations and free invalid
949 PLT section contents.
950 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
952 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
954 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
955 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
957 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
960 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
962 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
964 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
966 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
968 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
970 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
973 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
974 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
975 Add a has_no_copy_on_protected bitfield.
976 (elf_has_no_copy_on_protected): New.
977 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
978 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
979 (elf_merge_gnu_property_list): Likewise.
980 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
981 to FALSE for elf_has_no_copy_on_protected.
982 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
983 (elf_i386_link_hash_entry): Add def_protected.
984 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
985 when checking info->nocopyreloc.
986 (elf_i386_link_setup_gnu_properties): Don't set
987 extern_protected_data here.
988 (elf_i386_merge_symbol_attribute): New function.
989 (elf_backend_merge_symbol_attribute): New.
990 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
991 (elf_x86_64_link_hash_entry): Add def_protected.
992 (elf_x86_64_need_pic): Report protected symbol for def_protected.
993 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
994 when checking info->nocopyreloc.
995 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
996 relocation run-time overflow and unresolvable R_X86_64_32S
997 relocation against protected data symbol defined in shared object
998 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
999 (elf_x86_64_link_setup_gnu_properties): Don't set
1000 extern_protected_data here.
1001 (elf_x86_64_merge_symbol_attribute): New function.
1002 (elf_backend_merge_symbol_attribute): New.
1004 2017-08-26 Alan Modra <amodra@gmail.com>
1006 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1007 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1008 (ppc_elf_relocate_section): Comment fix.
1009 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1010 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1011 Support dynamic relocs for TPREL16 when non-pic too.
1012 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1013 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1016 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1019 "symbol" in comments.
1020 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1022 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1025 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1026 R_X86_64_PC32 relocation run-time overflow and unresolvable
1027 R_X86_64_32S relocation with -z nocopyreloc.
1029 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1031 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1032 Undefined symbols may not have a type.
1033 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1035 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1037 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1038 bfd_link_info. Report shared, PIE or PDE object based on
1040 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1041 (elf_x86_64_relocate_section): Likewise.
1043 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1045 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1046 for function symbols.
1047 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1049 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1051 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1052 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1053 is set on any input relocatable file.
1054 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1056 2017-08-23 Alan Modra <amodra@gmail.com>
1059 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1060 ensure_undefweak_dynamic. Handle undefined too.
1061 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1062 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1063 (allocate_dynrelocs): Discard undefined non-default visibility
1064 relocs first. Make undefined syms dynamic. Tidy goto.
1066 2017-08-21 Alan Modra <amodra@gmail.com>
1067 H.J. Lu <hongjiu.lu@intel.com>
1070 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1071 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1073 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1076 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1077 undefined weak symbols.
1079 2017-08-18 Nick Clifton <nickc@redhat.com>
1082 * tekhex.c (getsym): Fix check for source pointer walking off the
1083 end of the input buffer.
1085 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1088 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1089 relocations in debug sections, change abort to _bfd_error_handler.
1091 2017-08-14 Nick Clifton <nickc@redhat.com>
1094 * elf.c (setup_group): Check for an empty or very small group
1096 * po/bfd.pot: Regenerate.
1098 2017-08-14 Alan Modra <amodra@gmail.com>
1101 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1102 alignment padding here.
1103 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1104 in a reverse pass over sections.
1106 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1109 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1110 for @plt suffixes first.
1111 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1113 2017-08-08 Nick Clifton <nickc@redhat.com>
1116 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1117 small section lengths.
1118 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1120 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1121 there is enough data present in the note.
1123 2017-08-08 Alan Modra <amodra@gmail.com>
1126 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1127 got.refcount for GOTOFF relocs, just create .got section.
1129 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1131 * elflink.c (elf_link_add_object_symbols): Move common symbol
1132 check after bed->common_definition.
1134 2017-08-07 Alan Modra <amodra@gmail.com>
1137 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1138 needed to define various dynamic tags have been discarded.
1140 2017-08-07 Nick Clifton <nickc@redhat.com>
1143 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1144 has not been set then use the bfd returned by
1145 _bfd_elf_link_setup_gnu_properties. If that is null then search
1146 through all the input bfds selecting the first normal, ELF format
1148 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1150 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1152 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1154 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1155 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1156 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1157 (elf_i386_link_check_relocs): New function.
1158 (bfd_elf32_bfd_link_check_relocs): New.
1159 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1161 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1162 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1163 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1164 (elf_x86_64_link_check_relocs): New function.
1165 (bfd_elf64_bfd_link_check_relocs): New.
1166 (bfd_elf32_bfd_link_check_relocs): Likewise.
1168 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1171 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1172 as undefined for --no-define-common.
1174 2017-08-05 Alan Modra <amodra@gmail.com>
1176 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1177 hppa_link_hash_table.
1179 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1181 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1182 entries for sysregs with negative indices.
1184 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1186 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1187 isn't the S/390 specific elf data.
1188 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1190 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1192 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1193 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1194 [R_RISCV_ADD16]: Likewise.
1195 [R_RISCV_ADD32]: Likewise.
1196 [R_RISCV_ADD64]: Likewise.
1197 [R_RISCV_SUB6]: Likewise.
1198 [R_RISCV_SUB8]: Likewise.
1199 [R_RISCV_SUB16]: Likewise.
1200 [R_RISCV_SUB32]: Likewise.
1201 [R_RISCV_SUB64]: Likewise.
1203 2017-07-31 Alan Modra <amodra@gmail.com>
1205 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1206 without ld.so checks.
1208 2017-07-29 Alan Modra <amodra@gmail.com>
1211 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1212 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1213 (is_elfv2_localentry0): Test non_zero_localentry.
1214 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1216 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1218 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1219 pointer check for htab->elf.irelplt.
1220 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1222 2017-07-27 Nick Clifton <nickc@redhat.com>
1225 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1227 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1229 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1231 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1233 (evax_bfd_print_emh): Check for invalid string lengths.
1235 2017-07-25 Nick Clifton <nickc@redhat.com>
1237 * po/fr.po: Updated French translation.
1239 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1242 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1243 16-bit absolute branches into 10-bit pc-relative branches on the
1244 MSP430 as well as the MSP430X.
1246 2017-07-25 Alan Modra <amodra@gmail.com>
1248 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1249 (stub_eh_frame_size): New function.
1250 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1251 (group_sections): Init group tls_get_addr_opt_bctrl.
1252 (ppc64_elf_size_stubs): Update sizing and initialization of
1253 .eh_frame. Iteration over stubs via group list.
1254 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1255 (ppc64_elf_finish_dynamic_sections): Update finalization of
1258 2017-07-24 Nick Clifton <nickc@redhat.com>
1261 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1262 of the relocs to the canonicalize_one_reloc routine.
1263 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1264 for the _bfd_mach_o_canonicalize_one_reloc field.
1265 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1266 res_base parameter. Use to check for corrupt pair relocs.
1267 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1269 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1271 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1274 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1275 enough data in the record before attempting to parse it.
1276 (_bfd_vms_slurp_eeom): Likewise.
1278 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1279 (image_set_ptr): Likewise.
1280 (alpha_vms_slurp_relocs): Likewise.
1282 (alpha_vms_object_p): Check for a truncated record.
1284 2017-07-24 Nick Clifton <nickc@redhat.com>
1287 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1288 an unrecognized reloc and sets the bfd_error value.
1289 * libbfd.h: Regenerate.
1290 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1292 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1293 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1294 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1295 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1296 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1298 2017-07-23 Alan Modra <amodra@gmail.com>
1300 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1303 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1306 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1307 reloc_class_ifunc for ifunc symbols.
1309 2017-07-19 Nick Clifton <nickc@redhat.com>
1312 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1313 correct magic bytes at the start, set the error to wrong format
1314 and clear the format selector before returning NULL.
1316 2017-07-19 Nick Clifton <nickc@redhat.com>
1319 * coff-rs6000.c (_bfd_strntol): New function.
1320 (_bfd_strntoll): New function.
1321 (GET_VALUE_IN_FIELD): New macro.
1322 (EQ_VALUE_IN_FIELD): new macro.
1323 (_bfd_xcoff_slurp_armap): Use new macros.
1324 (_bfd_xcoff_archive_p): Likewise.
1325 (_bfd_xcoff_read_ar_hdr): Likewise.
1326 (_bfd_xcoff_openr_next_archived_file): Likewise.
1327 (_bfd_xcoff_stat_arch_elt): Likewise.
1328 * coff64-rs6000.c (_bfd_strntol): New function.
1329 (_bfd_strntoll): New function.
1330 (GET_VALUE_IN_FIELD): New macro.
1331 (xcoff64_slurp_armap): Use new macros.
1333 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1334 John Eric Martin <John.Martin@emmicro-us.com>
1336 * bfd-in2.h: Regenerate.
1337 * libbfd.h: Regenerate.
1338 * elf32-arc.c (JLI): Define.
1339 * reloc.c: Add JLI relocations.
1341 2017-07-18 Nick Clifton <nickc@redhat.com>
1344 * coff-sh.c: Fix spelling typos.
1345 * compress.c: Likewise.
1346 * cpu-pdp11.c: Likewise.
1347 * ecofflink.c: Likewise.
1348 * elf-m10300.c: Likewise.
1350 * elf32-arm.c: Likewise.
1351 * elf32-m68k.c: Likewise.
1352 * elf32-nds32.c: Likewise.
1353 * elf32-ppc.c: Likewise.
1354 * elf32-sh.c: Likewise.
1355 * elf32-v850.c: Likewise.
1356 * elf64-ppc.c: Likewise.
1357 * elf64-x86-64.c: Likewise.
1358 * elflink.c: Likewise.
1359 * elfnn-aarch64.c: Likewise.
1360 * elfxx-mips.c: Likewise.
1362 * sunos.c: Likewise.
1363 * vms-alpha.c: Likewise.
1364 * xcofflink.c: Likewise.
1366 2017-07-18 Nick Clifton <nickc@redhat.com>
1369 * coffcode.h (handle_COMDAT): Replace abort with an error message
1372 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1375 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1378 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1380 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1382 2017-07-16 Alan Modra <amodra@gmail.com>
1384 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1385 __tls_index GOT entries when using __tls_get_addr_opt stub.
1386 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1388 2017-07-12 Alan Modra <amodra@gmail.com>
1390 * po/es.po: Update from translationproject.org/latest/bfd/.
1391 * po/fi.po: Likewise.
1392 * po/fr.po: Likewise.
1393 * po/id.po: Likewise.
1394 * po/ja.po: Likewise.
1395 * po/ro.po: Likewise.
1396 * po/ru.po: Likewise.
1397 * po/sr.po: Likewise.
1398 * po/sv.po: Likewise.
1399 * po/tr.po: Likewise.
1400 * po/uk.po: Likewise.
1401 * po/vi.po: Likewise.
1402 * po/zh_CN.po: Likewise.
1403 * po/hr.po: New file from translationproject.org.
1404 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1405 * configure: Regenerate.
1407 2017-07-12 Nick Clifton <nickc@redhat.com>
1409 Fix compile time warnings using gcc 7.1.1.
1410 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1412 (elf_xtensa_get_gotplt_section): Increase length of got_name
1414 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1415 default return of FALSE.
1416 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1417 default return of FALSE.
1419 2017-07-12 Alan Modra <amodra@gmail.com>
1421 * binary.c (binary_set_section_contents): Don't print filepos in
1423 (coff_write_object_contents): Cast size_t for error message.
1424 (coff_slurp_line_table): Don't use bfd_vma symndx.
1425 (coff_slurp_reloc_table): Remove unneeded cast.
1426 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1428 (find_abstract_instance_name): Likewise.
1429 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1430 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1431 (elf32_arm_check_relocs): Make r_symndx an int.
1432 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1434 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1436 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1438 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1439 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1440 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1441 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1442 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1443 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1444 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1445 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1446 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1447 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1448 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1449 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1450 and use %lu for error message.
1451 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1452 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1455 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1457 (elf32_arm_final_link_relocate): Likewise.
1458 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1459 * coffcode.h (styp_to_sec_flags): Likewise.
1460 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1461 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1462 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1463 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1464 (elf32_bfin_merge_private_bfd_data): Likewise.
1465 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1466 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1467 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1468 (i370_elf_relocate_section): Likewise.
1469 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1470 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1471 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1472 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1473 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1474 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1475 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1476 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1477 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1478 * ieee.c (ieee_write_id, read_id): Likewise.
1479 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1480 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1481 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1482 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1483 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1484 * stabs.c (_bfd_link_section_stabs): Likewise.
1486 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1488 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1489 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1490 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1491 * coff-sh.c (sh_relax_section): Likewise.
1492 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1493 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1494 * coffcode.h (coff_slurp_reloc_table): Likewise.
1495 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1496 (_bfd_coff_read_string_table): Likewise.
1497 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1498 * compress.c (bfd_get_full_section_contents): Likewise.
1499 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1500 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1501 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1502 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1503 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1504 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1505 (elf32_arm_write_section): Likewise.
1506 * elf32-bfin.c (bfin_relocate_section): Likewise.
1507 (bfinfdpic_relocate_section): Likewise.
1508 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1509 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1510 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1511 (elf_i386_relocate_section): Likewise.
1512 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1513 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1514 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1515 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1516 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1517 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1518 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1519 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1520 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1521 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1522 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1523 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1524 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1525 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1526 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1527 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1528 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1529 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1530 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1531 * elf32-sh.c (sh_elf_relax_section): Likewise.
1532 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1533 (sh_elf_relocate_section): Likewise.
1534 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1535 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1536 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1537 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1538 * elf32-v850.c (v850_elf_relax_section): Likewise.
1539 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1540 (elf_vax_relocate_section): Likewise.
1541 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1542 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1543 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1544 (do_fix_for_relocatable_link): Likewise.
1545 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1546 (elf64_alpha_relax_with_lituse): Likewise.
1547 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1548 (elf_hppa_final_link_relocate): Likewise.
1549 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1550 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1551 (elf64_vms_link_add_object_symbols): Likewise.
1552 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1553 (mmix_final_link_relocate): Likewise.
1554 * elf64-s390.c (invalid_tls_insn): Likewise.
1555 (elf_s390_relocate_section): Likewise.
1556 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1557 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1558 (elf_x86_64_relocate_section): Likewise.
1559 * elfcode.h (elf_slurp_symbol_table): Likewise.
1560 * elfcore.h (elf_core_file_p): Likewise.
1561 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1562 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1563 (elfNN_aarch64_relocate_section): Likewise.
1564 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1565 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1566 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1567 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1568 (_bfd_mips_elf_relocate_section): Likewise.
1569 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1570 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1571 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1572 * ieee.c (ieee_slurp_external_symbols): Likewise.
1573 * ihex.c (ihex_write_object_content): Likewise.
1574 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1575 * merge.c (_bfd_merged_section_offset): Likewise.
1576 * mmo.c (mmo_write_loc_chunk): Likewise.
1577 (mmo_write_object_contents): Likewise.
1578 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1579 * stabs.c (_bfd_link_section_stabs): Likewise.
1580 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1582 2017-07-11 Alan Modra <amodra@gmail.com>
1584 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1586 2017-07-11 Alan Modra <amodra@gmail.com>
1588 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1589 instruction" error using _bfd_error_handler, not einfo.
1591 2017-07-10 Nick Clifton <nickc@redhat.com>
1593 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1594 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1596 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1598 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1600 2017-07-07 Alan Modra <amodra@gmail.com>
1602 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1604 2017-07-07 Alan Modra <amodra@gmail.com>
1606 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1607 as long long. Move code replacing "ll" with "I64", and simplify.
1609 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1611 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1614 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1616 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1618 (line_info_add_file_name): Likewise.
1619 (decode_line_info): Likewise.
1621 2017-07-04 Tristan Gingold <gingold@adacore.com>
1623 * version.m4: Bump version to 2.29.51
1624 * configure: Regenerate.
1626 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1628 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1629 sanity check at the head of this function.
1631 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1633 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1634 dwarf_line_str_size.
1635 (struct attr_abbrev): Add field implicit_const.
1636 (dwarf_debug_sections): Add .debug_line_str.
1637 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1638 (dwarf_debug_section_assert): Add static assertion.
1639 (read_indirect_line_string): New.
1640 (read_abbrevs): Support DW_FORM_implicit_const.
1641 (is_str_attr): Support DW_FORM_line_strp.
1642 (read_attribute_value): Support DW_FORM_line_strp and
1643 DW_FORM_implicit_const.
1644 (read_attribute): Support DW_FORM_implicit_const.
1645 (line_info_add_include_dir, line_info_add_include_dir_stub):
1646 (line_info_add_file_name, read_formatted_entries): New.
1647 (decode_line_info, parse_comp_unit): Support DWARF 5.
1648 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1650 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1652 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1653 abort statement that was put for symbols that are not dynamic.
1655 2017-07-03 Tristan Gingold <gingold@adacore.com>
1657 * po/bfd.pot: Regenerate
1659 2017-07-03 Alan Modra <amodra@gmail.com>
1661 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1662 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1663 * elf.c (setup_group): Use "Lx" to print sh_size.
1664 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1665 unknown section type in hex.
1666 (copy_special_section_fields): Style fix.
1667 (bfd_section_from_shdr): Correct format for sh_link. Use a
1668 common error message for all the variants of unrecognized
1670 (assign_file_positions_for_load_sections): Use "Lx" for lma
1671 adjust error message.
1672 (assign_file_positions_for_non_load_sections): Formatting.
1673 (rewrite_elf_program_header): Formatting. Use "Lx" for
1674 bfd_vma values in error messages.
1675 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1676 ELF_R_SYM value to type expected by format.
1677 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1679 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1680 (elf_link_input_bfd): Use "Lx" for r_info.
1681 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1683 2017-07-03 Alan Modra <amodra@gmail.com>
1685 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1686 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1687 Microsoft C library variant of long long format specifier.
1688 (PRINT20): Cast value to bfd_uint64_t not long long.
1689 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1690 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1691 long long. Don't cast to bfd_vma.
1692 * elf32-score.c (score3_bfd_getl48): Likewise.
1693 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1695 2017-07-03 Alan Modra <amodra@gmail.com>
1697 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1699 (bfd_elf_print_symbol): Don't cast symbol->flags.
1700 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1701 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1702 _bfd_error_handler argument order.
1703 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1705 2017-07-03 Alan Modra <amodra@gmail.com>
1707 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1708 AC_TYPE_LONG_DOUBLE.
1709 * configure: Regenerate.
1710 * config.in: Regenerate.
1712 2017-06-29 Andrew Waterman <andrew@sifive.com>
1714 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1717 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1719 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1720 unless it is undefined weak.
1721 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1722 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1724 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1725 is not dynamic in PIC, abort.
1727 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1730 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1731 undefined weak symbols into dynamic.
1732 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1733 relocation for non-dynamic symbols.
1734 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1736 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1738 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1739 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1740 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1741 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1742 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1745 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1747 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1748 (elfcore_write_s390_gs_bc): Likewise.
1749 * elf.c (elfcore_grok_s390_gs_cb): New function.
1750 (elfcore_grok_s390_gs_bc): New function.
1751 (elfcore_grok_note): Call them.
1752 (elfcore_write_s390_gs_cb): New function.
1753 (elfcore_write_s390_gs_bc): New function.
1754 (elfcore_write_register_note): Call them.
1756 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1758 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1759 bfd_get_file_size. Check archive element size.
1760 (_bfd_generic_get_section_contents_in_window): Likewise.
1762 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1764 * bfd-in2.h: Regenerated.
1765 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1766 (bfd_get_file_size): Likewise.
1768 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1769 Matthew Fortune <matthew.fortune@imgtec.com>
1771 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1772 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1773 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1774 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1776 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1777 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1778 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1779 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1780 `bfd_mach_mips_interaptiv_mr2' entries.
1781 * bfd-in2.h: Regenerate.
1783 2017-06-27 Nick Clifton <nickc@redhat.com>
1785 * tekhex.c (pass_over): Revert accidental conversion of a local
1786 array to a static array.
1788 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1791 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1792 reloc addend if necessary. Adjust diff only if
1793 shrinked_insn_address < end_address.
1795 2017-06-27 Alan Modra <amodra@gmail.com>
1798 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1799 (_bfd_generic_get_section_contents_in_window): Likewise.
1801 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1803 * elfnn-riscv.c (perform_relocation): Support the new
1804 R_RISCV_32_PCREL relocation.
1805 (riscv_elf_relocate_section): Likewise.
1806 * elfxx-riscv.c (howto_table): Likewise.
1807 (riscv_reloc_map): Likewise.
1808 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1809 * libbfd.h: Regenerate.
1811 2017-06-27 Alan Modra <amodra@gmail.com>
1814 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1815 Use unsigned file pointer type, and remove cast.
1816 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1817 Add "count", not "sz".
1819 2017-06-26 Pedro Alves <palves@redhat.com>
1822 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1825 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1828 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1831 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1833 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1834 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1835 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1836 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1837 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1839 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1842 * compress.c (bfd_get_full_section_contents): Don't check the
1844 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1845 reject a section whose size + offset is greater than the size
1847 (_bfd_generic_get_section_contents_in_window): Likewise.
1849 2017-06-26 Nick Clifton <nickc@redhat.com>
1852 * tekhex.c (getvalue): Check for the source pointer exceeding the
1853 end pointer before the first byte is read.
1855 2017-06-26 Nick Clifton <nickc@redhat.com>
1858 * opncls.c (get_build_id): Check that the section is big enough
1859 to contain the whole note.
1860 * compress.c (bfd_get_full_section_contents): Check for and reject
1861 a section whose size is greater than the size of the entire file.
1862 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1863 contain a notes section.
1865 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1867 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1869 (elf_s390_modify_segment_map): Likewise.
1870 (bfd_elf_s390_set_options): Lisewise.
1872 2017-06-26 Alan Modra <amodra@gmail.com>
1874 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1876 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1877 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1878 .preinit_array on --just-syms bfds.
1879 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1880 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1881 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1883 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1885 * elf.c (find_link): Bounds check "hint".
1887 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1889 * elf32-arm.c (using_thumb_only): Update list of architectures in
1890 BFD_ASSERT for which the logic is valid.
1891 (using_thumb2_bl): Likewise.
1892 (using_thumb2): Likewise and return true for ARMv8-R.
1893 (arch_has_arm_nop): Likewise.
1894 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1895 merging logic. Update commentis for value 15 of v8m_baseline,
1896 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1897 merging of value 15 of Tag_CPU_arch.
1899 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1901 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1902 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1903 * bfd-in2.h: Regenerate.
1905 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1907 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1908 the error_alignment label forward. Properly align program
1909 property note section.
1911 2017-06-22 Eric Christopher <echristo@gmail.com>
1913 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1914 abs to fix a truncation warning.
1916 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1918 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1919 local undefined weak symbol to 0.
1920 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1922 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1924 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1925 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1926 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1927 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1928 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1929 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1930 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1931 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1933 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1935 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1936 (elf_i386_lazy_ibt_plt_entry): Likewise.
1937 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1938 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1939 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1940 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1941 (elf_i386_lazy_plt_layout): Likewise.
1942 (elf_i386_non_lazy_plt_layout): Likewise.
1943 (elf_i386_link_hash_entry): Add plt_second.
1944 (elf_i386_link_hash_table): Add plt_second and
1945 plt_second_eh_frame.
1946 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1947 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1948 the second PLT. Check the second PLT.
1949 (elf_i386_relocate_section): Use the second PLT to resolve
1950 PLT reference if needed.
1951 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1953 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1954 second PLT. Generate unwind info for the second PLT.
1955 (elf_i386_plt_type): Add plt_second.
1956 (elf_i386_get_synthetic_symtab): Support the second PLT.
1957 (elf_i386_parse_gnu_properties): Support
1958 GNU_PROPERTY_X86_FEATURE_1_AND.
1959 (elf_i386_merge_gnu_properties): Support
1960 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1961 on GNU_PROPERTY_X86_FEATURE_1_IBT
1962 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1963 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1964 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1965 is set on all relocatable inputs.
1966 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1967 (elf_x32_lazy_ibt_plt_entry): Likewise.
1968 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1969 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1970 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1971 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1972 (elf_x86_64_lazy_ibt_plt): Likewise.
1973 (elf_x32_lazy_ibt_plt): Likewise.
1974 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1975 (elf_x32_non_lazy_ibt_plt): Likewise.
1976 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1977 (elf_x86_64_parse_gnu_properties): Support
1978 GNU_PROPERTY_X86_FEATURE_1_AND.
1979 (elf_x86_64_merge_gnu_properties): Support
1980 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1981 on GNU_PROPERTY_X86_FEATURE_1_IBT
1982 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1983 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1984 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1985 is set on all relocatable inputs.
1987 2017-06-22 Nick Clifton <nickc@redhat.com>
1990 * som.c (setup_sections): NUL terminate the space_strings buffer.
1991 Check that the space.name field does not index beyond the end of
1992 the space_strings buffer.
1994 2017-06-21 Nick Clifton <nickc@redhat.com>
1997 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1999 2017-06-21 Nick Clifton <nickc@redhat.com>
2002 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2003 type of the size parameter.
2004 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2005 length of the counted string.
2006 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2007 (_bfd_vms_save_counted_string): Likewise.
2008 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2009 _bfd_vms_save_counted_string.
2010 (_bfd_vms_slurp_ehdr): Likewise.
2011 (_bfd_vms_slurp_egsd): Likewise.
2012 (Parse_module): Likewise.
2014 2017-06-21 Alan Modra <amodra@gmail.com>
2016 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2017 calls before tocsave calls.
2018 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2021 2017-06-21 Nick Clifton <nickc@redhat.com>
2024 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2025 bfd_get_full_section_contents returns no contents.
2027 2017-06-21 Nick Clifton <nickc@redhat.com>
2030 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2033 2017-06-21 Nick Clifton <nickc@redhat.com>
2036 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2038 (image_set_ptr): Likewise.
2039 (alpha_vms_fix_sec_rel): Likewise.
2040 (alpha_vms_slurp_relocs): Likewise.
2042 2017-06-21 Nick Clifton <nickc@redhat.com>
2045 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2047 (ieee_archive_p): Likewise.
2048 (ieee_object_p): Likewise.
2050 2017-06-21 Nick Clifton <nickc@redhat.com>
2053 * elf.c (setup_group): Zero the group section pointer list after
2054 allocation so that loops can be caught. Check for NULL pointers
2055 when processing a group list.
2057 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2059 * elf-s390.h: New file.
2060 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2062 (elf_s390_additional_program_headers): New function.
2063 (elf_s390_modify_segment_map): New function.
2064 (bfd_elf_s390_set_options): New function.
2065 (elf_backend_additional_program_headers)
2066 (elf_backend_modify_segment_map): Add macro definitions.
2068 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2071 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2072 the DYNAMIC bit instead of bfd_count_sections.
2074 2017-06-19 Nick Clifton <nickc@redhat.com>
2077 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2079 (evax_bfd_print_eeom): Likewise.
2080 (evax_bfd_print_egsd): Check for an overlarge record length.
2081 (evax_bfd_print_etir): Likewise.
2083 2017-06-19 Nick Clifton <nickc@redhat.com>
2086 * libieee.h (struct common_header_type): Add end_p field.
2087 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2089 (read_id): Check for a length that exceeds the remaining bytes in
2091 (ieee_seek): Initialise end_p.
2092 (ieee_archive_p): Likewise.
2093 (ieee_object_p): Likewise.
2095 2017-06-19 Nick Clifton <nickc@redhat.com>
2098 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2099 before reading the EIHS structure entries.
2101 2017-06-19 Nick Clifton <nickc@redhat.com>
2104 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2105 gsd_size. Check that there are enough bytes remaining to read the
2106 type and size of the next egsd. Check that the size of the egsd
2107 does not exceed the size of the record.
2109 2017-06-19 Alan Modra <amodra@gmail.com>
2111 * config.bfd: Correct targ_underscore for cris.
2113 2017-06-18 Alan Modra <amodra@gmail.com>
2115 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2116 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2118 2017-06-16 Nick Clifton <nickc@redhat.com>
2120 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2121 bucketlist is empty because there are no symbols to add to the
2124 2017-06-16 Alan Modra <amodra@gmail.com>
2130 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2131 (BFD_JUMP_TABLE_LINK): Likewise.
2132 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2133 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2134 (bfd_elf_define_start_stop): New function.
2135 * linker.c (bfd_generic_define_start_stop): New function.
2136 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2138 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2139 * aout-target.h (MY_bfd_define_start_stop): Define.
2140 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2141 * binary.c (binary_bfd_define_start_stop): Define.
2142 * bout.c (b_out_bfd_define_start_stop): Define.
2143 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2144 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2145 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2146 * coffcode.h (coff_bfd_define_start_stop): Define.
2147 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2148 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2149 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2150 * ieee.c (ieee_bfd_define_start_stop): Define.
2151 * ihex.c (ihex_bfd_define_start_stop): Define.
2152 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2153 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2154 * mmo.c (mmo_bfd_define_start_stop): Define.
2155 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2156 * oasys.c (oasys_bfd_define_start_stop): Define.
2157 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2158 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2159 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2160 * som.c (som_bfd_define_start_stop): Define.
2161 * srec.c (srec_bfd_define_start_stop): Define.
2162 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2163 * versados.c (versados_bfd_define_start_stop): Define.
2164 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2165 (alpha_vms_bfd_define_start_stop): Define.
2166 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2167 * bfd-in2.h: Regenerate.
2168 * libbfd.h: Regenerate.
2170 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2172 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2173 SYMBOL_REFERENCES_LOCAL.
2175 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2178 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2179 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2180 runtime for if there needs copy relocation elimination.
2181 (need_copy_relocation_p): New function. Return true for symbol with
2182 pc-relative references and if it's against read-only sections.
2183 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2184 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2185 that are related with accessing external objects.
2186 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2187 in elfNN_aarch64_check_relocs.
2189 2017-06-15 Nick Clifton <nickc@redhat.com>
2192 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2195 (ieee_archive_p): Likewise.
2197 2017-06-15 Nick Clifton <nickc@redhat.com>
2200 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2202 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2204 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2205 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2206 keep both windowed and call0 ABI PLT definitions.
2207 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2208 elf_xtensa_*_plt_entry endex.
2209 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2211 2017-06-14 Nick Clifton <nickc@redhat.com>
2214 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2217 2017-06-14 Nick Clifton <nickc@redhat.com>
2220 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2221 maximum value for the ascic pointer. Check that name processing
2222 does not read beyond this value.
2223 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2226 2017-06-14 Nick Clifton <nickc@redhat.com>
2229 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2230 (process_otr): Check for an invalid offset in the otr structure.
2232 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2234 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2236 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2242 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2243 vtable field to a union.
2244 (_bfd_elf_is_start_stop): Removed.
2245 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2246 __start_SECNAME and __stop_SECNAME symbols.
2247 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2248 * elflink.c (_bfd_elf_is_start_stop): Removed.
2249 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2250 _bfd_elf_is_start_stop.
2251 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2252 __stop_SECNAME symbols. Updated.
2253 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2254 (bfd_elf_gc_record_vtinherit): Likewise.
2255 (bfd_elf_gc_record_vtentry): Likewise.
2257 2017-06-13 Nick Clifton <nickc@redhat.com>
2260 * elflink.c (elf_link_adjust_relocs): Generate an error when
2261 encountering a reloc against a symbol removed by garbage
2264 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2266 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2267 to merge_gnu_properties.
2268 * elf-properties.c (elf_merge_gnu_properties): Add struct
2269 bfd_link_info * and pass it to merge_gnu_properties.
2270 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2271 and pass it to elf_merge_gnu_properties.
2272 (_bfd_elf_link_setup_gnu_properties): Pass info to
2273 elf_merge_gnu_property_list.
2274 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2276 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2278 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2281 * binary.c (binary_set_section_contents): Scale lma by octets
2282 per byte to set filepos.
2284 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2286 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2289 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2291 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2294 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2296 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2297 patched section contents for TLS IE reloc.
2298 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2300 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2302 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2303 RELOC_FOR_GLOBAL_SYMBOL macro.
2305 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2307 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2310 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2312 * config/tc-arc.c (md_undefined_symbol): Changed.
2313 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2315 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2317 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2320 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2322 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2323 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2325 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2327 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2330 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2332 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2333 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2334 is non-zero. Add clarifying comments.
2336 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2338 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2339 name. Use local IFUNC symbol name string to report unsupported
2340 non-PIC call to IFUNC function.
2341 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2342 when generating R_386_IRELATIVE relocation.
2343 (elf_i386_finish_dynamic_symbol): Likewise.
2344 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2346 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2347 when generating R_X86_64_IRELATIVE relocation.
2348 (elf_x86_64_finish_dynamic_symbol): Likewise.
2350 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2352 * elf.c (setup_group): Make sure BFD sections are created for all
2353 group sections in the input file when processing SHF_GROUP
2355 (bfd_section_from_shdr): Avoid duplicating logic already
2356 implemented in `setup_group'.
2358 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2361 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2362 if the hint address is zero.
2364 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2367 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2368 ELF_COMMON_DEF_P for common symbols.
2370 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2372 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2373 SEC_GROUP sections as SEC_EXCLUDE.
2374 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2375 (assign_section_numbers): Use resolve_section_groups flag instead
2376 of relocatable link type.
2377 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2378 flag instead of checking the final_link flag for part of the
2379 checks in here. Fix white space as a result.
2380 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2381 instead of relocatable link type.
2382 (bfd_elf_final_link): Likewise.
2384 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2386 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2388 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2389 (s3_bfd_score_elf_check_relocs): Likewise.
2390 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2391 (score_elf_final_link_relocate): Likewise.
2392 (s7_bfd_score_elf_check_relocs): Likewise.
2394 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2396 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2399 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2401 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2402 from `reloc_count' rather than decrementing it.
2403 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2404 `reloc_count' by `int_rels_per_ext_rel'.
2405 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2406 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2407 entry determination.
2408 (s3_bfd_score_elf_check_relocs): Likewise.
2409 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2410 (s7_bfd_score_elf_relocate_section): Likewise.
2411 (s7_bfd_score_elf_check_relocs): Likewise.
2412 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2413 prototype and function.
2414 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2415 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2416 triple rather than once the sum of REL and RELA relocation entry
2418 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2419 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2420 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2421 storage allocation size determination.
2422 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2423 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2424 by `int_rels_per_ext_rel' for last relocation entry
2426 (bfd_elf_final_link): Do not multiply `reloc_count' by
2427 `int_rels_per_ext_rel' for internal relocation storage
2428 allocation size determination.
2429 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2430 `int_rels_per_ext_rel' for last relocation entry determination.
2431 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2432 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2433 (_bfd_mips_elf_relocate_section): Likewise.
2435 2017-06-05 Alan Modra <amodra@gmail.com>
2438 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2440 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2442 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2443 determine structure sizes.
2444 (elfcore_grok_freebsd_prstatus): Likewise.
2446 2017-06-01 Alan Modra <amodra@gmail.com>
2448 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2449 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2451 (is_elfv2_localentry0): New function.
2452 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2453 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2454 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2455 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2456 optimized localentry:0 stubs.
2457 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2458 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2460 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2462 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2464 2017-05-30 Casey Smith <clegg89@gmail.com>
2467 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2468 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2470 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2472 * cpu-arc.c (arc_compatible): New function.
2474 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2476 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2478 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2481 * bfdio.c (bfd_get_file_size): New function.
2482 * bfd-in2.h: Regenerated.
2484 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2486 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2489 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2491 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2492 dynobj instead of htab->elf.dynobj.
2494 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2496 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2498 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2499 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2500 actual number of internal relocations retrieved. Adjust
2501 function description.
2502 (bfd_elf64_canonicalize_reloc): Remove macro.
2503 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2505 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2507 * archures.c (bfd_mach_sparc_v9m8): Define.
2508 (bfd_mach_sparc_v8plusm8): Likewise.
2509 (bfd_mach_sparc_v9_p): Adjust to M8.
2510 (bfd_mach_sparc_64bit_p): Likewise.
2511 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2512 bfd_mach_sparc_v8plusm8.
2513 * bfd-in2.h: Regenerated.
2514 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2516 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2517 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2518 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2520 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2521 bfd_mach_sparc_v8plusm8.
2523 2017-05-19 Alan Modra <amodra@gmail.com>
2525 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2526 debug and special sections when no non-note alloc sections in an
2529 2017-05-18 Alan Modra <amodra@gmail.com>
2531 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2532 * elf-m10300.c: Likewise.
2534 * elf32-arc.c: Likewise.
2535 * elf32-bfin.c: Likewise.
2536 * elf32-m68k.c: Likewise.
2537 * elf32-nds32.c: Likewise.
2538 * elf32-tilepro.c: Likewise.
2539 * elflink.c: Likewise.
2540 * elfnn-aarch64.c: Likewise.
2541 * elfnn-riscv.c: Likewise.
2542 * elfxx-tilegx.c: Likewise.
2543 * mach-o.c: Likewise.
2544 * peXXigen.c: Likewise.
2545 * vms-alpha.c: Likewise.
2546 * vms-lib.c: Likewise.
2548 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2551 * elflink.c (elf_gc_mark_debug_section): New function.
2552 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2553 referenced by kept debug sections.
2555 2017-05-16 Alan Modra <amodra@gmail.com>
2557 * elf-m10300.c: Rename occurrences of non_ir_ref.
2558 * elf32-arm.c: Likewise.
2559 * elf32-bfin.c: Likewise.
2560 * elf32-cr16.c: Likewise.
2561 * elf32-cris.c: Likewise.
2562 * elf32-d10v.c: Likewise.
2563 * elf32-dlx.c: Likewise.
2564 * elf32-fr30.c: Likewise.
2565 * elf32-frv.c: Likewise.
2566 * elf32-hppa.c: Likewise.
2567 * elf32-i370.c: Likewise.
2568 * elf32-i386.c: Likewise.
2569 * elf32-iq2000.c: Likewise.
2570 * elf32-lm32.c: Likewise.
2571 * elf32-m32c.c: Likewise.
2572 * elf32-m32r.c: Likewise.
2573 * elf32-m68hc1x.c: Likewise.
2574 * elf32-m68k.c: Likewise.
2575 * elf32-mcore.c: Likewise.
2576 * elf32-metag.c: Likewise.
2577 * elf32-microblaze.c: Likewise.
2578 * elf32-moxie.c: Likewise.
2579 * elf32-msp430.c: Likewise.
2580 * elf32-mt.c: Likewise.
2581 * elf32-nios2.c: Likewise.
2582 * elf32-or1k.c: Likewise.
2583 * elf32-ppc.c: Likewise.
2584 * elf32-rl78.c: Likewise.
2585 * elf32-s390.c: Likewise.
2586 * elf32-score.c: Likewise.
2587 * elf32-score7.c: Likewise.
2588 * elf32-sh.c: Likewise.
2589 * elf32-tic6x.c: Likewise.
2590 * elf32-tilepro.c: Likewise.
2591 * elf32-v850.c: Likewise.
2592 * elf32-vax.c: Likewise.
2593 * elf32-xstormy16.c: Likewise.
2594 * elf32-xtensa.c: Likewise.
2595 * elf64-alpha.c: Likewise.
2596 * elf64-hppa.c: Likewise.
2597 * elf64-ia64-vms.c: Likewise.
2598 * elf64-mmix.c: Likewise.
2599 * elf64-ppc.c: Likewise.
2600 * elf64-s390.c: Likewise.
2601 * elf64-sh64.c: Likewise.
2602 * elf64-x86-64.c: Likewise.
2603 * elflink.c: Likewise.
2604 * elfnn-aarch64.c: Likewise.
2605 * elfnn-ia64.c: Likewise.
2606 * elfnn-riscv.c: Likewise.
2607 * elfxx-mips.c: Likewise.
2608 * elfxx-sparc.c: Likewise.
2609 * elfxx-tilegx.c: Likewise.
2610 * linker.c: Likewise.
2612 2017-05-16 Alan Modra <amodra@gmail.com>
2614 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2615 * elflink.c (elf_link_add_object_symbols): Update to use
2617 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2619 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2621 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2623 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2625 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2627 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2628 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2630 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2632 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2634 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2636 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2637 to plt_second/plt_second_eh_frame.
2638 (elf_x86_64_link_hash_newfunc): Updated.
2639 (elf_x86_64_allocate_dynrelocs): Likewise.
2640 (elf_x86_64_size_dynamic_sections): Likewise.
2641 (elf_x86_64_relocate_section): Likewise.
2642 (elf_x86_64_finish_dynamic_symbol): Likewise.
2643 (elf_x86_64_finish_dynamic_sections): Likewise.
2644 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2645 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2647 (elf_backend_setup_gnu_properties): Updated. Create the
2648 .plt.sec section instead of the .plt.sec section.
2650 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2652 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2653 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2654 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2656 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2658 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2659 (bfd_elf64_set_reloc): Define.
2660 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2662 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2664 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2665 (struct bfd_target): New field _bfd_set_reloc.
2666 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2667 * reloc.c (_bfd_generic_set_reloc): New function.
2668 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2669 * nlm-target.h (nlm_set_reloc): Likewise.
2670 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2671 * aout-tic30.c (MY_set_reloc): Likewise.
2672 * aout-target.h (MY_set_reloc): Likewise.
2673 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2674 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2675 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2676 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2677 * aout-adobe.c (aout_32_set_reloc): Likewise.
2678 * bout.c (b_out_set_reloc): Likewise.
2679 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2680 * i386os9k.c (aout_32_set_reloc): Likewise.
2681 * ieee.c (ieee_set_reloc): Likewise.
2682 * oasys.c (oasys_set_reloc): Likewise.
2683 * som.c (som_set_reloc): Likewise.
2684 * versados.c (versados_set_reloc): Likewise.
2685 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2686 _bfd_generic_set_reloc.
2687 (rs6000_xcoff64_aix_vec): LIkewise.
2688 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2689 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2690 * i386msdos.c (msdos_set_reloc): Define to
2691 _bfd_norelocs_set_reloc.
2692 * elfcode.h (elf_set_reloc): Define.
2693 * bfd-in2.h: Regenerated.
2695 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2698 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2699 for IFUNC function address.
2701 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2703 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2704 (CONFLICT_LIST): Likewise.
2705 (opcode/arc-attrs.h): Include.
2706 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2707 (arc_extract_features): New file.
2708 (arc_stralloc): Likewise.
2709 (arc_elf_merge_attributes): Likewise.
2710 (arc_elf_merge_private_bfd_data): Use object attributes.
2711 (bfd_arc_get_mach_from_attributes): New function.
2712 (arc_elf_object_p): Use object attributes.
2713 (arc_elf_final_write_processing): Likewise.
2714 (elf32_arc_obj_attrs_arg_type): New function.
2715 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2716 (elf32_arc_section_from_shdr): Likewise.
2717 (elf_backend_obj_attrs_vendor): Define.
2718 (elf_backend_obj_attrs_section): Likewise.
2719 (elf_backend_obj_attrs_arg_type): Likewise.
2720 (elf_backend_obj_attrs_section_type): Likewise.
2721 (elf_backend_obj_attrs_handle_unknown): Likewise.
2722 (elf_backend_section_from_shdr): Likewise.
2724 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2727 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2728 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2729 and the destination is a Thumb symbol.
2731 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2733 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2734 initializer to silence GCC 4.2.
2735 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2737 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2739 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2740 (LAZY_PLT_ENTRY_SIZE): This.
2741 (NON_LAZY_PLT_ENTRY_SIZE): New.
2742 (elf_x86_64_plt0_entry): Renamed to ...
2743 (elf_x86_64_lazy_plt0_entry): This.
2744 (elf_x86_64_plt_entry): Renamed to ...
2745 (elf_x86_64_lazy_plt_entry): This.
2746 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2747 (elf_x86_64_lazy_bnd_plt0_entry): This.
2748 (elf_x86_64_legacy_plt_entry): Removed.
2749 (elf_x86_64_bnd_plt_entry): Renamed to ...
2750 (elf_x86_64_lazy_bnd_plt_entry): This.
2751 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2752 (elf_x86_64_non_lazy_plt_entry): This.
2753 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2754 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2755 (elf_x86_64_eh_frame_plt): Renamed to ...
2756 (elf_x86_64_eh_frame_lazy_plt): This.
2757 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2758 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2759 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2760 (elf_x86_64_eh_frame_non_lazy_plt): This.
2761 (elf_x86_64_lazy_plt_layout): New.
2762 (elf_x86_64_non_lazy_plt_layout): Likewise.
2763 (elf_x86_64_plt_layout): Likewise.
2764 (elf_x86_64_backend_data): Remove PLT layout information. Add
2765 os for target system.
2766 (GET_PLT_ENTRY_SIZE): Removed.
2767 (elf_x86_64_lazy_plt): New.
2768 (elf_x86_64_non_lazy_plt): Likewise.
2769 (elf_x86_64_lazy_bnd_plt): Likewise.
2770 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2771 (elf_x86-64_arch_bed): Updated.
2772 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2773 (elf_x86_64_create_dynamic_sections): Removed.
2774 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2775 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2776 (elf_x86-64_adjust_dynamic_symbol): Updated.
2777 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2778 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2779 size for PLT0 if there is no PLT0. Get plt_entry_size from
2780 non_lazy_plt for non-lazy PLT entries.
2781 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2782 from non_lazy_plt for non-lazy PLT entries.
2783 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2784 if there is no PLT0.
2785 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2786 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2787 entries with non-lazy PLT layout. Don't fill the second and third
2788 slots in the PLT entry if there is no PLT0.
2789 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2790 if there is no PLT0. Set sh_entsize on the .plt.got section.
2791 (compare_relocs): New.
2792 (elf_x86_64_plt_type): Likewise.
2793 (elf_x86_64_plt): Likewise.
2794 (elf_x86_64_nacl_plt): New. Forward declaration.
2795 (elf_x86_64_get_plt_sym_val): Removed.
2796 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2797 against all dynamic relocations.
2798 (elf_x86_64_link_setup_gnu_properties): New function.
2799 (elf_backend_create_dynamic_sections): Updated.
2800 (elf_backend_setup_gnu_properties): New.
2801 (elf_x86_64_nacl_plt): New.
2802 (elf_x86_64_nacl_arch_bed): Updated.
2804 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2806 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2807 (LAZY_PLT_ENTRY_SIZE): This.
2808 (NON_LAZY_PLT_ENTRY_SIZE): New.
2809 (elf_i386_plt0_entry): Renamed to ...
2810 (elf_i386_lazy_plt0_entry): This.
2811 (elf_i386_plt_entry): Renamed to ...
2812 (elf_i386_lazy_plt_entry): This.
2813 (elf_i386_pic_plt0_entry): Renamed to ...
2814 (elf_i386_pic_lazy_plt0_entry): This.
2815 (elf_i386_pic_plt_entry): Renamed to ...
2816 (elf_i386_pic_lazy_plt_entry): This.
2817 (elf_i386_got_plt_entry): Renamed to ...
2818 (elf_i386_non_lazy_plt_entry): This.
2819 (elf_i386_pic_got_plt_entry): Renamed to ...
2820 (elf_i386_pic_non_lazy_plt_entry): This.
2821 (elf_i386_eh_frame_plt): Renamed to ...
2822 (elf_i386_eh_frame_lazy_plt): This.
2823 (elf_i386_eh_frame_plt_got): Renamed to ...
2824 (elf_i386_eh_frame_non_lazy_plt): This.
2825 (elf_i386_plt_layout): Renamed to ...
2826 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2827 eh_frame_plt_got_size.
2828 (elf_i386_non_lazy_plt_layout): New.
2829 (elf_i386_plt_layout): Likewise.
2830 (elf_i386_non_lazy_plt): Likewise.
2831 (GET_PLT_ENTRY_SIZE): Removed.
2832 (elf_i386_plt): Renamed to ...
2833 (elf_i386_lazy_plt): This.
2834 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2835 (elf_i386_arch_bed): Updated.
2836 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2837 (elf_i386_create_dynamic_sections): Removed.
2838 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2839 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2840 (elf_i386_adjust_dynamic_symbol): Updated.
2841 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2842 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2843 size for PLT0 if there is no PLT0.
2844 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2845 output section is discarded only if GOT isn't empty.
2846 (elf_i386_relocate_section): Updated. Properly get PLT index
2847 if there is no PLT0.
2848 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2849 second and third slots in the PLT entry if there is no PLT0.
2850 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2851 if there is no PLT0. Set sh_entsize on the .plt.got section.
2852 (elf_i386_nacl_plt): Forward declaration.
2853 (elf_i386_get_plt_sym_val): Removed.
2854 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2855 against all dynamic relocations.
2856 (elf_i386_link_setup_gnu_properties): New function.
2857 (elf_backend_create_dynamic_sections): Updated.
2858 (elf_backend_setup_gnu_properties): New.
2859 (elf_i386_nacl_plt): Updated.
2860 (elf_i386_nacl_arch_bed): Likewise.
2861 (elf_i386_vxworks_arch_bed): Likewise.
2863 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2865 * elflink.c (elf_output_implib): Remove executable flag from import
2867 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2868 library is a relocatable object file.
2870 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2873 * elf32-avr.c (avr_should_move_sym): New function.
2874 (avr_should_reduce_sym_size): Likewise.
2875 (avr_should_increase_sym_size): Likewise.
2876 (elf32_avr_relax_delete_bytes): Adjust symbol values
2877 and sizes by calling new functions.
2879 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2881 * config.bfd (riscv32-*): Enable rv64.
2883 2017-05-02 Alan Modra <amodra@gmail.com>
2886 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2887 rather than h->root.type == bfd_link_hash_new.
2888 (bfd_elf_record_link_assignment): Similarly, call
2889 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2891 2017-04-29 Alan Modra <amodra@gmail.com>
2894 * reloc.c (reloc_offset_in_range): New function.
2895 (bfd_perform_relocation, bfd_install_relocation): Use it.
2896 (_bfd_final_link_relocate): Likewise.
2898 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2900 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2901 before using .plt.got.
2902 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2904 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2906 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2907 instead of "+=" to update 0.
2909 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2911 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2912 .plt.got section here.
2913 (elf_i386_check_relocs): Don't create the .plt.got section.
2914 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2915 the .plt.got and .plt.bnd sections here.
2916 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2919 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2921 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2923 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2924 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2925 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2926 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2929 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2931 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2933 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2934 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2935 the first relocatable ELF input with GNU properties.
2937 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2939 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2940 VxWorks for non-PIC.
2942 2017-04-27 Alan Modra <amodra@gmail.com>
2944 * elf-bfd.h (struct elf_backend_data): Make asection param of
2945 elf_backend_eh_frame_address_size const.
2946 (_bfd_elf_eh_frame_address_size): Likewise.
2947 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2948 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2949 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2950 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2951 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2952 (next_cie_fde_offset): Constify params.
2953 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2955 2017-04-27 Alan Modra <amodra@gmail.com>
2957 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2958 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2959 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2961 (offset_adjust): New function.
2962 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2963 (adjust_eh_frame_local_symbols): Likewise.
2964 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2965 after changing anything. Return true if anything changed.
2966 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2967 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2969 2017-04-27 Alan Modra <amodra@gmail.com>
2971 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2974 2017-04-27 Alan Modra <amodra@gmail.com>
2976 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2977 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2978 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2979 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2980 for undef and undefweak dyn_relocs.
2981 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2982 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2983 (allocate_got, allocate_dynrelocs): Likewise.
2984 (ppc64_elf_relocate_section): Likewise.
2986 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2988 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2989 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2990 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2991 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2993 2017-04-26 Nick Clifton <nickc@redhat.com>
2996 * reloc.c (bfd_perform_relocation): Check for a negative address
2999 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3002 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3004 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3005 (elf_backend_always_renumber_dynsyms): Define.
3006 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3007 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3008 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3009 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3011 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3013 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3015 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3016 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3017 sections have been created.
3019 2017-04-26 Nick Clifton <nickc@redhat.com>
3022 * compress.c (bfd_init_section_compress_status): Check the return
3023 value from bfd_malloc.
3025 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3027 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3028 no_finish_dynamic_symbol.
3029 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3031 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3032 weak symbol, don't make it dynamic.
3033 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3034 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3035 relocation for GOT reference.
3036 (elf_x86_64_finish_dynamic_symbol): Abort if
3037 no_finish_dynamic_symbol isn't 0.
3039 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3042 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3043 undefined weak symbol, don't make it dynamic.
3044 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3045 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3046 relocation for R_386_GOT32.
3048 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3051 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3053 2017-04-23 Alan Modra <amodra@gmail.com>
3056 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3057 * elf.c (lcomm_sym): New.
3058 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3059 * bfd-in2.h: Regenerate.
3061 2017-04-23 Alan Modra <amodra@gmail.com>
3064 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3065 parameters and comment.
3066 (_bfd_elf_get_reloc_section): Delete.
3067 (_bfd_elf_plt_get_reloc_section): Declare.
3068 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3069 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3071 (_bfd_elf_get_reloc_section): ..here. Delete.
3072 (assign_section_numbers): Call elf_get_reloc_section.
3073 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3074 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3076 2017-04-23 Alan Modra <amodra@gmail.com>
3079 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3082 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3085 * elf32-i386.c (elf_i386_link_hash_entry): Add
3086 no_finish_dynamic_symbol.
3087 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3088 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3089 symbol, don't make it dynamic in PIE.
3090 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3091 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3092 relocation for R_386_GOT32
3093 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3096 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3100 * elflink.c (elf_link_add_object_symbols): Require
3101 --no-dynamic-linker with -E/--dynamic-list when creating
3104 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3106 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3109 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3111 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3112 dynamic symbol sorting.
3114 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3117 * elflink.c (elf_link_add_object_symbols): Preserve
3118 dynamic_ref_after_ir_def when restoring the symbol table for
3119 unneeded dynamic object.
3121 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3124 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3125 on on undefined IFUNC symbol in the second PLT.
3127 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3129 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3131 2017-04-19 Alan Modra <amodra@gmail.com>
3133 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3134 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3135 * elf32-ppc.c:Formatting.
3136 (ensure_undefweak_dynamic): Don't make dynamic when
3137 info->dynamic_undefined_weak is zero.
3138 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3139 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3140 not default visibility. Discard undef and undefweak
3142 (ppc_elf_relocate_section): Adjust to suit.
3143 * elf64-ppc.c: Formatting.
3144 (ensure_undefweak_dynamic): Don't make dynamic when
3145 info->dynamic_undefined_weak is zero.
3146 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3147 info->dynamic_undefined_weak. Discard them earlier.
3149 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3152 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3153 before generating the version definition section.
3155 2017-04-17 Alan Modra <amodra@gmail.com>
3157 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3158 state when a regular object file defines a symbol with
3159 incompatible type to that defined by an earlier shared lib.
3161 2017-04-13 Alan Modra <amodra@gmail.com>
3163 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3165 * elf32-arm.c: Likewise.
3166 * elf32-i386.c: Likewise.
3167 * elf32-mep.c: Likewise.
3168 * elf64-ia64-vms.c: Likewise.
3169 * elf64-x86-64.c: Likewise.
3170 * elflink.c: Likewise.
3171 * elfnn-ia64.c: Likewise.
3172 * elfxx-mips.c: Likewise.
3174 2017-04-13 Alan Modra <amodra@gmail.com>
3176 * aoutx.h: Use %B and %A in error messages throughout file.
3177 * aout-cris.c: Likewise.
3178 * archive.c: Likewise.
3179 * binary.c: Likewise.
3180 * coff-rs6000.c: Likewise.
3181 * coff-tic4x.c: Likewise.
3182 * coffcode.h: Likewise.
3183 * coffgen.c: Likewise.
3184 * cofflink.c: Likewise.
3185 * coffswap.h: Likewise.
3186 * cpu-arm.c: Likewise.
3187 * elf-eh-frame.c: Likewise.
3188 * elf-m10300.c: Likewise.
3190 * elf32-arc.c: Likewise.
3191 * elf32-arm.c: Likewise.
3192 * elf32-bfin.c: Likewise.
3193 * elf32-frv.c: Likewise.
3194 * elf32-iq2000.c: Likewise.
3195 * elf32-m32c.c: Likewise.
3196 * elf32-microblaze.c: Likewise.
3197 * elf32-nds32.c: Likewise.
3198 * elf32-rl78.c: Likewise.
3199 * elf32-rx.c: Likewise.
3200 * elf32-score.c: Likewise.
3201 * elf32-score7.c: Likewise.
3202 * elf32-sh64.c: Likewise.
3203 * elf32-v850.c: Likewise.
3204 * elf32-vax.c: Likewise.
3205 * elf32-visium.c: Likewise.
3206 * elf64-ia64-vms.c: Likewise.
3207 * elf64-mmix.c: Likewise.
3208 * elf64-sh64.c: Likewise.
3209 * elfcode.h: Likewise.
3210 * elfnn-aarch64.c: Likewise.
3211 * elfnn-ia64.c: Likewise.
3212 * elfxx-mips.c: Likewise.
3213 * hpux-core.c: Likewise.
3216 * linker.c: Likewise.
3217 * merge.c: Likewise.
3219 * oasys.c: Likewise.
3220 * pdp11.c: Likewise.
3221 * peXXigen.c: Likewise.
3222 * rs6000-core.c: Likewise.
3223 * vms-alpha.c: Likewise.
3224 * xcofflink.c: Likewise.
3226 2017-04-13 Alan Modra <amodra@gmail.com>
3228 * bfd.c (PRINT_TYPE): Define.
3229 (_doprnt): New function.
3230 (error_handler_internal): Use _doprnt.
3231 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3232 calls in their natural order, throughout file.
3233 * coff-mcore.c: Likewise.
3234 * coff-ppc.c: Likewise.
3235 * coff-tic80.c: Likewise.
3236 * cofflink.c: Likewise.
3237 * elf-s390-common.c: Likewise.
3239 * elf32-arm.c: Likewise.
3240 * elf32-i386.c: Likewise.
3241 * elf32-m32r.c: Likewise.
3242 * elf32-msp430.c: Likewise.
3243 * elf32-spu.c: Likewise.
3244 * elf64-ia64-vms.c: Likewise.
3245 * elf64-sparc.c: Likewise.
3246 * elf64-x86-64.c: Likewise.
3247 * elflink.c: Likewise.
3248 * elfnn-aarch64.c: Likewise.
3249 * elfnn-ia64.c: Likewise.
3250 * elfxx-mips.c: Likewise.
3252 2017-04-13 Alan Modra <amodra@gmail.com>
3254 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3255 branch veneers" error. Fix double space and format message.
3256 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3257 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3259 2017-04-13 Alan Modra <amodra@gmail.com>
3261 * bfd-in2.h: Regenerate.
3263 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3265 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3266 extra `\n' in warning/error messages.
3267 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3268 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3270 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3272 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3273 processor-specific properties with generic ELF target vector.
3275 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3277 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3278 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3279 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3280 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3282 (link_hash_newfunc): Initialize has_got_reloc and
3284 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3286 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3288 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3290 (_bfd_sparc_elf_fixup_symbol): New function.
3291 (allocate_dynrelocs): Don't allocate space for dynamic
3292 relocations and discard relocations against resolved undefined
3293 weak symbols in executable. Don't make resolved undefined weak
3294 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3295 relocation against undefined weak symbols in PIE.
3296 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3297 relocations against resolved undefined weak symbols in PIE
3298 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3299 without ynamic PLT/GOT relocations for resolved undefined weak
3301 Don't generate dynamic relocation against resolved undefined
3302 weak symbol in executable.
3303 (pie_finish_undefweak_symbol): New function.
3304 (_bfd_sparc_elf_finish_dynamic_sections): Call
3305 pie_finish_undefweak_symbol on all symbols in PIE.
3306 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3307 (_bfd_sparc_elf_fixup_symbol): New function.
3309 2017-04-10 Nick Clifton <nickc@redhat.com>
3311 * config.bfd: Remove ns32k from obsolete list.
3313 2017-04-10 Alan Modra <amodra@gmail.com>
3316 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3317 (special_sections_i): Likewise for .init_array.
3318 (special_sections_p): Likewise for .preinit_array.
3320 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3324 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3325 ELF_COMMON_DEF_P for common symbols.
3326 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3327 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3328 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3329 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3330 07492f668d2173da7a2bda3707ff0985e0f460b6.
3332 2017-04-07 Pedro Alves <palves@redhat.com>
3334 * opncls.c (bfd_get_debug_link_info): Rename to...
3335 (bfd_get_debug_link_info_1): ... this. Change type of second
3336 parameter to void pointer. Adjust.
3337 (bfd_get_debug_link_info): Reimplement on top of
3338 bfd_get_debug_link_info_1.
3339 (separate_debug_file_exists, separate_alt_debug_file_exists):
3340 Change type of second parameter to void pointer. Adjust.
3341 (get_func_type, check_func_type): Change type of second parameter
3343 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3344 the callback functions instead of passing the address of a local.
3345 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3346 find_separate_debug_file.
3347 (get_alt_debug_link_info_shim): Change type of second parameter to
3348 void pointer. Adjust.
3349 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3350 find_separate_debug_file.
3351 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3352 of second parameter to void pointer. Adjust.
3353 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3354 pointer local to find_separate_debug_file.
3356 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3358 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3359 external symbols with a definition.
3360 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3362 2017-04-07 Alan Modra <amodra@gmail.com>
3364 * po/SRC-POTFILES.in: Regenerate.
3366 2017-04-05 Alan Modra <amodra@gmail.com>
3368 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3371 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3373 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3374 numbers for DataDirectory entry indicies passed to
3377 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3379 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3380 each GNU_MBIND section and align GNU_MBIND section to page size.
3381 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3382 segment for each GNU_MBIND section.
3383 (_bfd_elf_init_private_section_data): Copy sh_info from input
3384 for GNU_MBIND section.
3386 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3388 * elfnn-riscv.c (GP_NAME): Delete.
3389 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3390 (_bfd_riscv_relax_lui): Likewise.
3392 2017-04-04 Nick Clifton <nickc@redhat.com>
3395 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3397 (bfd_elf_final_link): Only initialize the extended symbol index
3398 section if there are extended symbol tables to list.
3400 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3402 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3403 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3404 * configure.ac (elf): Add elf-properties.lo.
3405 * Makefile.in: Regenerated.
3406 * configure: Likewise.
3407 * elf-bfd.h (elf_property_kind): New.
3408 (elf_property): Likewise.
3409 (elf_property_list): Likewise.
3410 (elf_properties): Likewise.
3411 (_bfd_elf_parse_gnu_properties): Likewise.
3412 (_bfd_elf_get_property): Likewise.
3413 (_bfd_elf_link_setup_gnu_properties): Likewise.
3414 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3415 and setup_gnu_properties.
3416 (elf_obj_tdata): Add properties.
3417 * elf-properties.c: New file.
3418 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3419 (elf_i386_merge_gnu_properties): Likewise.
3420 (elf_backend_parse_gnu_properties): Likewise.
3421 (elf_backend_merge_gnu_properties): Likewise.
3422 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3423 (elf_x86_64_merge_gnu_properties): Likewise.
3424 (elf_backend_parse_gnu_properties): Likewise.
3425 (elf_backend_merge_gnu_properties): Likewise.
3426 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3427 (elf_backend_parse_gnu_properties): Likewise.
3428 (elf_backend_setup_gnu_properties): Likewise.
3429 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3430 elf_backend_merge_gnu_properties and
3431 elf_backend_setup_gnu_properties.
3433 2017-03-30 Pip Cet <pipcet@gmail.com>
3435 * elf32-wasm32.c: Add relocation code, two relocs.
3436 * reloc.c: Add wasm32 relocations.
3437 * libbfd.h: Regenerate.
3438 * bfd-in2.h: Regenerate.
3439 * bfd/po/bfd.pot: Regenerate.
3441 2017-03-29 Nick Clifton <nickc@redhat.com>
3444 * coff-bfd.h (struct coff_section_data): Add new fields:
3445 saved_bias and bias.
3446 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3447 computed for PE binaries.
3448 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3451 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3454 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3455 to handle a local symbol with a hash-symbol-entry; without PLT.
3456 Add BFD_ASSERT for an incidental case with GOT entry present.
3457 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3458 isn't forced-or-set local.
3460 2017-03-27 Pip Cet <pipcet@gmail.com>
3462 * wasm-module.c: New file to support WebAssembly modules.
3463 * wasm-module.h: New file to support WebAssembly modules.
3464 * doc/webassembly.texi: Start documenting wasm-module.c.
3465 * config.bfd: Add wasm_vec.
3466 * targets.c: Likewise.
3467 * configure.ac: Likewise.
3468 * Makefile.am: Add entries for wasm-module.c.
3469 * Makefile.in: Regenerate.
3470 * configure: Regenerate.
3471 * po/SRC-POTFILES.in: Regenerate.
3473 2017-03-27 Pip Cet <pipcet@gmail.com>
3475 * cpu-wasm32.c: New file to support wasm32 architecture.
3476 * elf32-wasm32.c: New file to support wasm32 architecture.
3477 * Makefile.am: Add wasm32 architecture.
3478 * archures.c: Likewise.
3479 * config.bfd: Likewise.
3480 * configure.ac: Likewise.
3481 * targets.c: Likewise.
3482 * Makefile.in: Regenerate.
3483 * bfd-in2.h: Regenerate.
3484 * configure: Regenerate.
3485 * po/SRC-POTFILES.in: Regenerate.
3487 2017-03-20 Alan Modra <amodra@gmail.com>
3490 * elf64-ppc.c (compare_symbols): Stabilize sort.
3492 2017-03-18 Alan Modra <amodra@gmail.com>
3494 * elf64-ppc.c (struct ppc_link_hash_table): Add
3495 local_ifunc_resolver and maybe_local_ifunc_resolver.
3496 (ppc_build_one_stub): Set flags on emitting dynamic
3497 relocation to ifunc.
3498 (ppc64_elf_relocate_section): Likewise.
3499 (ppc64_elf_finish_dynamic_symbol): Likewise.
3500 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3501 local dynamic relocs to ifuncs.
3502 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3503 local_ifunc_resolver and maybe_local_ifunc_resolver.
3504 (ppc_elf_relocate_section): Set flag on emitting dynamic
3505 relocation to ifuncs.
3506 (ppc_elf_finish_dynamic_symbol): Likewise.
3507 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3508 dynamic relocs to ifuncs.
3510 2017-03-13 Nick Clifton <nickc@redhat.com>
3513 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3514 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3515 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3516 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3517 * bfd-in2.h: Regenerate.
3518 * libbfd.h: Regenerate.
3519 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3521 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3522 (elfNN_aarch64_howto_table): Likewise.
3523 (aarch64_tls_transition_without_check): Likewise.
3524 (aarch64_reloc_got_type): Likewise.
3525 (elfNN_aarch64_final_link_relocate): Likewise.
3526 (elfNN_aarch64_tls_relax): Likewise.
3527 (elfNN_aarch64_relocate_section): Likewise.
3528 (elfNN_aarch64_gc_sweep_hook): Likewise.
3529 (elfNN_aarch64_check_relocs): Likewise.
3530 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3531 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3533 2017-03-11 Alan Modra <amodra@gmail.com>
3535 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3536 parameter is in fact used. Whitespace fixes.
3537 * elf64-ppc.c: Likewise.
3539 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3541 * rs6000-core.c (CORE_NEW): Simplify macro when
3542 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3544 2017-03-07 Alan Modra <amodra@gmail.com>
3548 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3551 2017-03-05 Alan Modra <amodra@gmail.com>
3553 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3554 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3555 (next_cie_fde_offset): New function.
3556 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3557 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3558 four bytes. Align CIEs to four or eight bytes depending on
3559 per_encoding_aligned8. Align FDEs according to their encoding.
3560 Pad last FDE to output section alignment.
3561 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3563 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3564 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3565 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3567 2017-03-02 Martin Bickel <binutils@ineranves.de>
3570 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3571 empty segments which have a zero filesz, but a non-zero memsz.
3573 2017-03-02 Alan Modra <amodra@gmail.com>
3575 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3577 2017-02-28 Alan Modra <amodra@gmail.com>
3579 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3580 (ppc64_elf_relocate_section): Likewise.
3582 2017-02-28 Alan Modra <amodra@gmail.com>
3585 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3586 rather than elf32_nios2_hash_table or elf_hash_table.
3587 (create_got_section): Likewise.
3588 (nios2_elf32_finish_dynamic_symbol): Likewise.
3589 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3590 (nios2_elf32_size_dynamic_sections): Likewise.
3591 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3592 vars. Use htab equivalents directly instead. Don't create
3593 all dynamic sections on needing just the GOT. Use a goto
3594 rather than a fall-through with reloc test. Ensure
3595 htab->dynobj is set when making dynamic sreloc section.
3596 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3597 equivalent directly instead. Don't segfault on looking for
3598 .dynamic when dynamic sections have not been created. Don't
3599 segfault on .got.plt being discarded.
3600 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3601 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3602 fixme and another not so relevant comment.
3603 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3604 already set, set hash table dynobj on creating .sbss.
3606 2017-02-28 Alan Modra <amodra@gmail.com>
3608 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3609 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3610 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3611 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3612 (ppc64_elf_relocate_section): Likewise.
3613 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3614 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3615 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3616 * libbfd.h: Regenerate.
3617 * bfd-in2.h: Regenerate.
3619 2017-02-28 Alan Modra <amodra@gmail.com>
3621 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3622 dynamic .data.rel.ro read-only.
3623 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3624 rather than section flags when deciding where copy reloc goes.
3625 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3626 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3627 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3628 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3629 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3630 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3631 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3632 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3633 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3634 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3635 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3636 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3637 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3638 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3639 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3640 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3641 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3642 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3643 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3645 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3647 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3648 `jalr $0, $25' instruction encoding.
3650 2017-02-27 Nick Clifton <nickc@redhat.com>
3653 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3654 generating a seg-fault when encountering a symbol that has been
3655 deleted by garbage collection.
3657 2017-02-25 Alan Modra <amodra@gmail.com>
3659 * elf32-arc.c (struct dynamic_sections): Delete.
3660 (enum dyn_section_types): Delete.
3661 (dyn_section_names): Delete.
3662 (arc_create_dynamic_sections): Delete.
3663 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3664 segfault on discarded .rela.plt section.
3665 (elf_arc_size_dynamic_sections): Formatting. Don't call
3666 arc_create_dynamic_sections. Don't allocate memory for sections
3667 handled by the generic linker. Correct code finding relocs in
3668 read-only sections. Set SEC_EXCLUDE on zero size .got,
3669 .got.plt, and .dynbss sections. Do set .interp for pies.
3671 2017-02-24 Andrew Waterman <andrew@sifive.com>
3673 * elfnn-riscv.c (GP_NAME): New macro.
3674 (riscv_global_pointer_value): Use it.
3675 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3676 output section, consider only that section's alignment.
3678 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3680 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3681 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3682 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3683 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3685 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3687 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3688 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3691 2017-02-23 Alan Modra <amodra@gmail.com>
3694 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3696 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3697 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3700 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3703 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3704 processing ahead of the call to `elf_gc_sweep_symbol'.
3706 2017-02-22 Nick Clifton <nickc@redhat.com>
3709 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3710 created section 4-byte alignment.
3712 2017-02-22 Alan Modra <amodra@gmail.com>
3714 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3715 on .got or .plt output section being discarded by script.
3716 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3719 2017-02-21 Alan Modra <amodra@gmail.com>
3721 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3722 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3724 2017-02-20 Alan Modra <amodra@gmail.com>
3727 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3728 if DT_RELSZ/DT_RELASZ is zero.
3730 2017-02-17 Nick Clifton <nickc@redhat.com>
3732 * compress.c (bfd_get_full_section_contents): Remember to reduce
3733 compressed size by the sizeof the compression header when
3734 decompressing the contents.
3736 2017-02-17 Pedro Alves <palves@redhat.com>
3738 * srec.c (Chunk): Rename to ...
3739 (_bfd_srec_len): ... this.
3740 (S3Forced): Rename to ...
3741 (_bfd_srec_forceS3): ... this.
3742 * objcopy.c: Adjust all references.
3744 2017-02-17 Pedro Alves <palves@redhat.com>
3746 * archive.c (bsd_write_armap): Rename to ...
3747 (_bfd_bsd_write_armap): ... this.
3748 (coff_write_armap): Rename to ...
3749 (_bfd_coff_write_armap): ... this.
3750 * libbfd-in.h (bsd_write_armap): Rename to ...
3751 (_bfd_bsd_write_armap): ... this.
3752 (coff_write_armap): Rename to ...
3753 (_bfd_coff_write_armap): ... this.
3754 * aout-target.h, aout-tic30.c: Adjust all users.
3755 * libbfd.h: Regenerate.
3757 2017-02-17 Pedro Alves <palves@redhat.com>
3759 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3760 (warn_deprecated): Rename to ...
3761 (_bfd_warn_deprecated): ... this.
3762 * libbfd.c (warn_deprecated): Rename to ...
3763 (_bfd_warn_deprecated): ... this.
3764 * bfd-in2.h: Regenerate.
3766 2017-02-17 Pedro Alves <palves@redhat.com>
3768 * bfdio.c (real_ftell): Rename to ...
3769 (_bfd_real_ftell): ... this.
3770 (real_fseek): Rename to ...
3771 (_bfd_real_fseek): ... this.
3772 (real_fopen): Rename to ...
3773 (_bfd_real_fopen): ... this.
3774 * libbfd-in.h (real_ftell): Rename to ...
3775 (_bfd_real_ftell): ... this.
3776 (real_fseek): Rename to ...
3777 (_bfd_real_fseek): ... this.
3778 (real_fopen): Rename to ...
3779 (_bfd_real_fopen): ... this.
3780 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3781 * libbfd.h: Regenerate.
3783 2017-02-17 Pedro Alves <palves@redhat.com>
3785 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3786 * libbfd.c (read_unsigned_leb128): Rename to ...
3787 (_bfd_read_unsigned_leb128): ... this.
3788 (read_signed_leb128): Rename to ...
3789 (_bfd_read_signed_leb128): ... this.
3790 (safe_read_leb128): Rename to ...
3791 (_bfd_safe_read_leb128): ... this.
3792 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3793 (_bfd_read_unsigned_leb128): ... this.
3794 (read_signed_leb128): Rename to ...
3795 (_bfd_read_signed_leb128): ... this.
3796 (safe_read_leb128): Rename to ...
3797 (_bfd_safe_read_leb128): ... this.
3798 * libbfd.h: Renegerate.
3800 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3802 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3803 before trying to fine matching file and line information.
3805 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3807 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3808 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3809 not match current bfd, then reload debug information. Record bfd
3810 we're loading debug info for in the stash. If we have debug
3811 informatin in the cache then perform section placement before
3814 2017-02-16 Alan Modra <amodra@gmail.com>
3817 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3818 * elfxx-target.h (elf_backend_no_page_alias): Define.
3819 (elfNN_bed): Init new field.
3820 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3821 ensure PT_LOAD segment starts on a new page.
3822 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3824 2017-02-16 Alan Modra <amodra@gmail.com>
3827 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3830 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3832 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3833 * bfd-in2.h: Regenerated.
3835 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3838 * elf32-i386.c (elf_i386_relocate_section): Allow
3839 "lea foo@GOT, %reg" in PIC.
3841 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3844 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3845 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3846 error against local IFUNC symbol without a base register for
3849 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3851 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3852 `%P: %H:' with `info->callbacks->einfo'.
3853 (ppc_elf_relocate_section): Likewise.
3854 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3855 (ppc64_elf_edit_toc): Likewise.
3856 (ppc64_elf_relocate_section): Likewise.
3858 2017-02-14 Alan Modra <amodra@gmail.com>
3860 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3861 --gc-keep-exported, and test versioned field of sym rather than
3862 looking for @ in name.
3864 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3866 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3869 2017-02-13 Nick Clifton <nickc@redhat.com>
3872 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3875 2017-02-07 Andrew Waterman <andrew@sifive.com>
3877 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3878 entry size if PLT header is written.
3880 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3882 Fix sparc64 dynamic relocation processing to use the dynamic
3884 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3885 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3888 2017-02-03 Nick Clifton <nickc@redhat.com>
3891 * coffcode.h (coff_write_object_contents): Enlarge size of
3892 s_name_buf in order to avoid compile time warning about possible
3894 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3895 32-bits of insn value before printing into buffer.
3897 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3899 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3900 `max_local_dynindx'.
3901 (mips_elf_sort_hash_table): Handle it.
3902 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3903 symbols bump up `max_local_dynindx' rather than
3904 `max_non_got_dynindx'.
3906 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3908 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3909 `min_got_dynindx', `max_unref_got_dynindx' and
3910 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3911 (mips_elf_sort_hash_table): Adjust accordingly.
3913 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3915 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3916 to access the hash table.
3918 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3920 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3921 non-NULL `htab' to the beginning.
3923 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3925 * elflink.c (elf_gc_sweep): Wrap overlong line.
3927 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3929 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3930 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3931 * elfxx-mips.c (mips_elf_link_hash_table): Add
3932 `ignore_branch_isa' member.
3933 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3934 in branch relocation calculation as an error if
3935 `ignore_branch_isa' has been set.
3936 (_bfd_mips_elf_insn32): Rename to...
3937 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3938 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3939 Handle the new parameter.
3941 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3943 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3944 local variable dynobj.
3947 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3948 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3949 executable from read-only sections into sdynrelro.
3950 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3951 dynamic relocs in sdynrelro.
3952 (elf_backend_want_dynrelro): Define.
3954 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3956 * config.bfd (*-*-rtemsaout*): Mark as removed.
3958 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3960 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3961 (arm-*-rtems*): Move to (arm*-*-eabi*).
3962 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3963 (m68-*-rtems*): Move to (m68*-*-elf*).
3965 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3967 * config.bfd (*-*-rtemscoff*): Mark as removed.
3969 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3972 * elflink.c (bfd_elf_record_link_assignment): Revert last
3973 change and don't ever clear `forced_local'. Set `mark'
3975 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3977 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3978 (bfd_elf_size_dynamic_sections): ... here.
3979 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3980 and set `mark' instead in `__tls_get_addr_opt' processing.
3981 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3983 2017-01-24 Alan Modra <amodra@gmail.com>
3985 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3986 where dynamic relocs are preferable. Allow ifunc too.
3987 (ensure_undefweak_dynamic): New function.
3988 (allocate_dynrelocs): Use it here. Move plt handling last and
3989 don't make symbols dynamic, simplifying loop. Only make undef
3990 weak symbols with GOT entries dynamic. Correct condition
3991 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3992 comments. Remove goto.
3993 (ppc_elf_relocate_section): Correct test for using dynamic
3994 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3995 to suit. Set up explicit tls_index entries and implicit GOT
3996 tls_index entries resolvable at link time for
3997 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3998 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3999 (ensure_undefweak_dynamic): New function.
4000 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4001 with GOT entries dynamic. Remove unnecessary test of
4002 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4003 (ppc64_elf_relocate_section): Correct test for using dynamic
4004 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4005 to suit. Set up explicit tls_index entries and implicit GOT
4006 tls_index entries resolvable at link time for __tls_get_addr_opt.
4007 Simplify expression to clear mem for prelink.
4009 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4011 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4013 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4015 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4016 (elf_backend_hash_symbol): Define.
4018 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4021 * elflink.c (bfd_elf_record_link_assignment): Clear any
4022 `forced_local' marking for DSO symbols that are not being
4025 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4027 * elfnn-riscv.c (riscv_elf_object_p): New function.
4029 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4032 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4034 (elf_x86_64_check_relocs): Create .eh_frame section for the
4036 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4037 .eh_frame section for the .plt.bnd section.
4038 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4039 for the .plt.bnd section.
4041 2017-01-12 Nick Clifton <nickc@redhat.com>
4044 * opncls.c (find_separate_debug_file): Add include_dirs
4045 parameter. Only include the directory part of the bfd's filename
4046 in search paths if include_dirs is true. Add a couple of extra
4047 locations for looking for debug files.
4048 ( bfd_follow_gnu_debuglink): Update invocation of
4049 find_separate_debug_file.
4050 (bfd_follow_gnu_debugaltlink): Likewise.
4051 (get_build_id): New function: Finds the build-id of the given bfd.
4052 (get_build_id_name): New function: Computes the name of the
4053 separate debug info file for a bfd, based upon its build-id.
4054 (check_build_id_file): New function: Checks to see if a separate
4055 debug info file exists at the given location, and that its
4056 build-id matches that of the original bfd.
4057 (bfd_follow_build_id_debuglink): New function: Finds a separate
4058 debug info file for a given bfd by using the build-id method.
4059 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4060 method of locating a separate debug info file before using the
4062 * bfd-in2.h: Regenerate.
4064 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4067 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4068 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4069 elf_x86_64_eh_frame_plt_got.
4070 (elf_x86_64_size_dynamic_sections): Get unwind info from
4071 elf_x86_64_bnd_arch_bed for the BND PLT.
4073 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4075 * config.bfd: Add entries for i686-redox and x86_64-redox.
4077 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4079 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4081 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4082 .eh_frame section to 4 bytes for x32.
4083 (elf_x86_64_check_relocs): Likewise.
4085 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4088 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4089 (PLT_GOT_FDE_LENGTH): Likewise.
4090 (elf_i386_plt_layout): Add eh_frame_plt_got and
4091 eh_frame_plt_got_size.
4092 (elf_i386_plt): Updated.
4093 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4094 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4095 (elf_i386_size_dynamic_sections): Allocate and initialize
4096 .eh_frame section for .plt.got.
4097 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4099 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4100 eh_frame_plt_got_size.
4101 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4102 (PLT_GOT_FDE_LENGTH): Likewise.
4103 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4104 eh_frame_plt_got_size.
4105 (elf_x86_64_arch_bed): Updated.
4106 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4107 eh_frame_plt_got_size.
4108 (elf_x86_64_nacl_arch_bed): Likewise.
4109 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4110 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4111 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4112 .eh_frame section for .plt.got.
4113 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4116 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4118 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4119 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4121 2017-01-09 Nick Clifton <nickc@redhat.com>
4123 * dwarf2.c (lookup_address_in_function_table): Return early if
4124 there are no functions in the given comp unit, or if the high
4125 address of the last function in the comp unit is less than the
4128 2017-01-09 Nick Clifton <nickc@redhat.com>
4131 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4132 message if there are too many symbols to load.
4134 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4136 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4137 if relocs are cached.
4139 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4142 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4143 for R_MICROBLAZE_GOTOFF_64.
4145 2017-01-03 Nick Clifton <nickc@redhat.com>
4147 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4148 warning about using a possibly uninitialised variable.
4150 2017-01-02 Alan Modra <amodra@gmail.com>
4152 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4153 (allocate_plt_static, allocate_dynrelocs): Use it.
4155 2017-01-02 Alan Modra <amodra@gmail.com>
4157 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4158 .PARISC.unwind section.
4160 2017-01-02 Alan Modra <amodra@gmail.com>
4163 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4164 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4165 indirect to GOT pointer relative code edit.
4167 2017-01-02 Alan Modra <amodra@gmail.com>
4169 Update year range in copyright notice of all files.
4171 For older changes see ChangeLog-2016
4173 Copyright (C) 2017 Free Software Foundation, Inc.
4175 Copying and distribution of this file, with or without modification,
4176 are permitted in any medium without royalty provided the copyright
4177 notice and this notice are preserved.
4183 version-control: never