1 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
4 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
7 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
9 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
11 2017-07-16 Alan Modra <amodra@gmail.com>
13 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
14 __tls_index GOT entries when using __tls_get_addr_opt stub.
15 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
17 2017-07-12 Alan Modra <amodra@gmail.com>
19 * po/es.po: Update from translationproject.org/latest/bfd/.
31 * po/zh_CN.po: Likewise.
32 * po/hr.po: New file from translationproject.org.
33 * configure.ac (ALL_LINGUAS): Add hr. Sort.
34 * configure: Regenerate.
36 2017-07-12 Nick Clifton <nickc@redhat.com>
38 Fix compile time warnings using gcc 7.1.1.
39 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
41 (elf_xtensa_get_gotplt_section): Increase length of got_name
43 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
44 default return of FALSE.
45 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
46 default return of FALSE.
48 2017-07-12 Alan Modra <amodra@gmail.com>
50 * binary.c (binary_set_section_contents): Don't print filepos in
52 (coff_write_object_contents): Cast size_t for error message.
53 (coff_slurp_line_table): Don't use bfd_vma symndx.
54 (coff_slurp_reloc_table): Remove unneeded cast.
55 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
57 (find_abstract_instance_name): Likewise.
58 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
59 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
60 (elf32_arm_check_relocs): Make r_symndx an int.
61 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
63 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
65 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
67 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
68 * elf32-s390.c (elf_s390_check_relocs): Likewise.
69 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
70 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
71 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
72 * elf64-s390.c (elf_s390_check_relocs): Likewise.
73 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
74 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
75 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
76 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
77 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
78 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
79 and use %lu for error message.
80 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
81 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
84 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
86 (elf32_arm_final_link_relocate): Likewise.
87 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
88 * coffcode.h (styp_to_sec_flags): Likewise.
89 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
90 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
91 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
92 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
93 (elf32_bfin_merge_private_bfd_data): Likewise.
94 * elf32-cris.c (cris_elf_relocate_section): Likewise.
95 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
96 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
97 (i370_elf_relocate_section): Likewise.
98 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
99 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
100 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
101 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
102 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
103 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
104 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
105 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
106 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
107 * ieee.c (ieee_write_id, read_id): Likewise.
108 * mach-o.c (bfd_mach_o_write_contents): Likewise.
109 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
110 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
111 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
112 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
113 * stabs.c (_bfd_link_section_stabs): Likewise.
115 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
117 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
118 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
119 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
120 * coff-sh.c (sh_relax_section): Likewise.
121 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
122 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
123 * coffcode.h (coff_slurp_reloc_table): Likewise.
124 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
125 (_bfd_coff_read_string_table): Likewise.
126 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
127 * compress.c (bfd_get_full_section_contents): Likewise.
128 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
129 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
130 * elf.c (bfd_elf_string_from_elf_section): Likewise.
131 * elf32-arc.c (arc_special_overflow_checks): Likewise.
132 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
133 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
134 (elf32_arm_write_section): Likewise.
135 * elf32-bfin.c (bfin_relocate_section): Likewise.
136 (bfinfdpic_relocate_section): Likewise.
137 * elf32-hppa.c (hppa_build_one_stub): Likewise.
138 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
139 * elf32-i386.c (elf_i386_tls_transition): Likewise.
140 (elf_i386_relocate_section): Likewise.
141 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
142 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
143 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
144 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
145 * elf32-metag.c (elf_metag_relocate_section): Likewise.
146 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
147 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
148 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
149 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
150 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
151 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
152 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
153 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
154 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
155 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
156 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
157 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
158 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
159 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
160 * elf32-sh.c (sh_elf_relax_section): Likewise.
161 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
162 (sh_elf_relocate_section): Likewise.
163 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
164 * elf32-spu.c (spu_elf_relocate_section): Likewise.
165 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
166 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
167 * elf32-v850.c (v850_elf_relax_section): Likewise.
168 * elf32-vax.c (elf_vax_check_relocs): Likewise.
169 (elf_vax_relocate_section): Likewise.
170 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
171 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
172 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
173 (do_fix_for_relocatable_link): Likewise.
174 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
175 (elf64_alpha_relax_with_lituse): Likewise.
176 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
177 (elf_hppa_final_link_relocate): Likewise.
178 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
179 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
180 (elf64_vms_link_add_object_symbols): Likewise.
181 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
182 (mmix_final_link_relocate): Likewise.
183 * elf64-s390.c (invalid_tls_insn): Likewise.
184 (elf_s390_relocate_section): Likewise.
185 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
186 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
187 (elf_x86_64_relocate_section): Likewise.
188 * elfcode.h (elf_slurp_symbol_table): Likewise.
189 * elfcore.h (elf_core_file_p): Likewise.
190 * elflink.c (elf_link_read_relocs_from_section): Likewise.
191 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
192 (elfNN_aarch64_relocate_section): Likewise.
193 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
194 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
195 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
196 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
197 (_bfd_mips_elf_relocate_section): Likewise.
198 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
199 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
200 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
201 * ieee.c (ieee_slurp_external_symbols): Likewise.
202 * ihex.c (ihex_write_object_content): Likewise.
203 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
204 * merge.c (_bfd_merged_section_offset): Likewise.
205 * mmo.c (mmo_write_loc_chunk): Likewise.
206 (mmo_write_object_contents): Likewise.
207 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
208 * stabs.c (_bfd_link_section_stabs): Likewise.
209 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
211 2017-07-11 Alan Modra <amodra@gmail.com>
213 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
215 2017-07-11 Alan Modra <amodra@gmail.com>
217 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
218 instruction" error using _bfd_error_handler, not einfo.
220 2017-07-10 Nick Clifton <nickc@redhat.com>
222 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
223 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
225 2017-07-07 John Baldwin <jhb@FreeBSD.org>
227 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
229 2017-07-07 Alan Modra <amodra@gmail.com>
231 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
233 2017-07-07 Alan Modra <amodra@gmail.com>
235 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
236 as long long. Move code replacing "ll" with "I64", and simplify.
238 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
240 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
243 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
245 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
247 (line_info_add_file_name): Likewise.
248 (decode_line_info): Likewise.
250 2017-07-04 Tristan Gingold <gingold@adacore.com>
252 * version.m4: Bump version to 2.29.51
253 * configure: Regenerate.
255 2017-07-04 Jiong Wang <jiong.wang@arm.com>
257 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
258 sanity check at the head of this function.
260 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
262 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
264 (struct attr_abbrev): Add field implicit_const.
265 (dwarf_debug_sections): Add .debug_line_str.
266 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
267 (dwarf_debug_section_assert): Add static assertion.
268 (read_indirect_line_string): New.
269 (read_abbrevs): Support DW_FORM_implicit_const.
270 (is_str_attr): Support DW_FORM_line_strp.
271 (read_attribute_value): Support DW_FORM_line_strp and
272 DW_FORM_implicit_const.
273 (read_attribute): Support DW_FORM_implicit_const.
274 (line_info_add_include_dir, line_info_add_include_dir_stub):
275 (line_info_add_file_name, read_formatted_entries): New.
276 (decode_line_info, parse_comp_unit): Support DWARF 5.
277 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
279 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
281 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
282 abort statement that was put for symbols that are not dynamic.
284 2017-07-03 Tristan Gingold <gingold@adacore.com>
286 * po/bfd.pot: Regenerate
288 2017-07-03 Alan Modra <amodra@gmail.com>
290 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
291 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
292 * elf.c (setup_group): Use "Lx" to print sh_size.
293 (_bfd_elf_setup_sections): Remove unnecessary cast and print
294 unknown section type in hex.
295 (copy_special_section_fields): Style fix.
296 (bfd_section_from_shdr): Correct format for sh_link. Use a
297 common error message for all the variants of unrecognized
299 (assign_file_positions_for_load_sections): Use "Lx" for lma
300 adjust error message.
301 (assign_file_positions_for_non_load_sections): Formatting.
302 (rewrite_elf_program_header): Formatting. Use "Lx" for
303 bfd_vma values in error messages.
304 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
305 ELF_R_SYM value to type expected by format.
306 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
308 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
309 (elf_link_input_bfd): Use "Lx" for r_info.
310 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
312 2017-07-03 Alan Modra <amodra@gmail.com>
314 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
315 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
316 Microsoft C library variant of long long format specifier.
317 (PRINT20): Cast value to bfd_uint64_t not long long.
318 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
319 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
320 long long. Don't cast to bfd_vma.
321 * elf32-score.c (score3_bfd_getl48): Likewise.
322 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
324 2017-07-03 Alan Modra <amodra@gmail.com>
326 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
328 (bfd_elf_print_symbol): Don't cast symbol->flags.
329 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
330 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
331 _bfd_error_handler argument order.
332 (ppc_elf_merge_private_bfd_data): Don't cast flags.
334 2017-07-03 Alan Modra <amodra@gmail.com>
336 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
338 * configure: Regenerate.
339 * config.in: Regenerate.
341 2017-06-29 Andrew Waterman <andrew@sifive.com>
343 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
346 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
348 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
349 unless it is undefined weak.
350 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
351 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
353 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
354 is not dynamic in PIC, abort.
356 2017-06-29 Jiong Wang <jiong.wang@arm.com>
359 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
360 undefined weak symbols into dynamic.
361 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
362 relocation for non-dynamic symbols.
363 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
365 2017-06-29 Jiong Wang <jiong.wang@arm.com>
367 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
368 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
369 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
370 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
371 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
374 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
376 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
377 (elfcore_write_s390_gs_bc): Likewise.
378 * elf.c (elfcore_grok_s390_gs_cb): New function.
379 (elfcore_grok_s390_gs_bc): New function.
380 (elfcore_grok_note): Call them.
381 (elfcore_write_s390_gs_cb): New function.
382 (elfcore_write_s390_gs_bc): New function.
383 (elfcore_write_register_note): Call them.
385 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
387 * libbfd.c (_bfd_generic_get_section_contents): Don't call
388 bfd_get_file_size. Check archive element size.
389 (_bfd_generic_get_section_contents_in_window): Likewise.
391 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
393 * bfd-in2.h: Regenerated.
394 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
395 (bfd_get_file_size): Likewise.
397 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
398 Matthew Fortune <matthew.fortune@imgtec.com>
400 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
401 * cpu-mips.c (I_interaptiv_mr2): New enum value.
402 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
403 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
405 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
406 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
407 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
408 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
409 `bfd_mach_mips_interaptiv_mr2' entries.
410 * bfd-in2.h: Regenerate.
412 2017-06-27 Nick Clifton <nickc@redhat.com>
414 * tekhex.c (pass_over): Revert accidental conversion of a local
415 array to a static array.
417 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
420 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
421 reloc addend if necessary. Adjust diff only if
422 shrinked_insn_address < end_address.
424 2017-06-27 Alan Modra <amodra@gmail.com>
427 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
428 (_bfd_generic_get_section_contents_in_window): Likewise.
430 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
432 * elfnn-riscv.c (perform_relocation): Support the new
433 R_RISCV_32_PCREL relocation.
434 (riscv_elf_relocate_section): Likewise.
435 * elfxx-riscv.c (howto_table): Likewise.
436 (riscv_reloc_map): Likewise.
437 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
438 * libbfd.h: Regenerate.
440 2017-06-27 Alan Modra <amodra@gmail.com>
443 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
444 Use unsigned file pointer type, and remove cast.
445 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
446 Add "count", not "sz".
448 2017-06-26 Pedro Alves <palves@redhat.com>
451 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
454 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
457 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
460 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
462 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
463 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
464 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
465 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
466 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
468 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
471 * compress.c (bfd_get_full_section_contents): Don't check the
473 * libbfd.c (_bfd_generic_get_section_contents): Check for and
474 reject a section whose size + offset is greater than the size
476 (_bfd_generic_get_section_contents_in_window): Likewise.
478 2017-06-26 Nick Clifton <nickc@redhat.com>
481 * tekhex.c (getvalue): Check for the source pointer exceeding the
482 end pointer before the first byte is read.
484 2017-06-26 Nick Clifton <nickc@redhat.com>
487 * opncls.c (get_build_id): Check that the section is big enough
488 to contain the whole note.
489 * compress.c (bfd_get_full_section_contents): Check for and reject
490 a section whose size is greater than the size of the entire file.
491 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
492 contain a notes section.
494 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
496 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
498 (elf_s390_modify_segment_map): Likewise.
499 (bfd_elf_s390_set_options): Lisewise.
501 2017-06-26 Alan Modra <amodra@gmail.com>
503 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
505 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
506 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
507 .preinit_array on --just-syms bfds.
508 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
509 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
510 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
512 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
514 * elf.c (find_link): Bounds check "hint".
516 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
518 * elf32-arm.c (using_thumb_only): Update list of architectures in
519 BFD_ASSERT for which the logic is valid.
520 (using_thumb2_bl): Likewise.
521 (using_thumb2): Likewise and return true for ARMv8-R.
522 (arch_has_arm_nop): Likewise.
523 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
524 merging logic. Update commentis for value 15 of v8m_baseline,
525 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
526 merging of value 15 of Tag_CPU_arch.
528 2017-06-23 Jiong Wang <jiong.wang@arm.com>
530 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
531 BFD_RELOC_AARCH64_ADR_GOT_PAGE
532 * bfd-in2.h: Regenerate.
534 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
536 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
537 the error_alignment label forward. Properly align program
538 property note section.
540 2017-06-22 Eric Christopher <echristo@gmail.com>
542 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
543 abs to fix a truncation warning.
545 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
548 local undefined weak symbol to 0.
549 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
551 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
553 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
554 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
555 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
556 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
557 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
558 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
559 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
560 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
562 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
564 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
565 (elf_i386_lazy_ibt_plt_entry): Likewise.
566 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
567 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
568 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
569 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
570 (elf_i386_lazy_plt_layout): Likewise.
571 (elf_i386_non_lazy_plt_layout): Likewise.
572 (elf_i386_link_hash_entry): Add plt_second.
573 (elf_i386_link_hash_table): Add plt_second and
575 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
576 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
577 the second PLT. Check the second PLT.
578 (elf_i386_relocate_section): Use the second PLT to resolve
579 PLT reference if needed.
580 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
582 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
583 second PLT. Generate unwind info for the second PLT.
584 (elf_i386_plt_type): Add plt_second.
585 (elf_i386_get_synthetic_symtab): Support the second PLT.
586 (elf_i386_parse_gnu_properties): Support
587 GNU_PROPERTY_X86_FEATURE_1_AND.
588 (elf_i386_merge_gnu_properties): Support
589 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
590 on GNU_PROPERTY_X86_FEATURE_1_IBT
591 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
592 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
593 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
594 is set on all relocatable inputs.
595 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
596 (elf_x32_lazy_ibt_plt_entry): Likewise.
597 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
598 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
599 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
600 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
601 (elf_x86_64_lazy_ibt_plt): Likewise.
602 (elf_x32_lazy_ibt_plt): Likewise.
603 (elf_x86_64_non_lazy_ibt_plt): Likewise.
604 (elf_x32_non_lazy_ibt_plt): Likewise.
605 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
606 (elf_x86_64_parse_gnu_properties): Support
607 GNU_PROPERTY_X86_FEATURE_1_AND.
608 (elf_x86_64_merge_gnu_properties): Support
609 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
610 on GNU_PROPERTY_X86_FEATURE_1_IBT
611 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
612 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
613 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
614 is set on all relocatable inputs.
616 2017-06-22 Nick Clifton <nickc@redhat.com>
619 * som.c (setup_sections): NUL terminate the space_strings buffer.
620 Check that the space.name field does not index beyond the end of
621 the space_strings buffer.
623 2017-06-21 Nick Clifton <nickc@redhat.com>
626 * coff-sh.c (sh_reloc): Check for an out of range reloc.
628 2017-06-21 Nick Clifton <nickc@redhat.com>
631 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
632 type of the size parameter.
633 (_bfd_vms_save_counted_string): Add second parameter - the maximum
634 length of the counted string.
635 * vms.h (_bfd_vms_save_sized_string): Update prototype.
636 (_bfd_vms_save_counted_string): Likewise.
637 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
638 _bfd_vms_save_counted_string.
639 (_bfd_vms_slurp_ehdr): Likewise.
640 (_bfd_vms_slurp_egsd): Likewise.
641 (Parse_module): Likewise.
643 2017-06-21 Alan Modra <amodra@gmail.com>
645 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
646 calls before tocsave calls.
647 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
650 2017-06-21 Nick Clifton <nickc@redhat.com>
653 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
654 bfd_get_full_section_contents returns no contents.
656 2017-06-21 Nick Clifton <nickc@redhat.com>
659 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
662 2017-06-21 Nick Clifton <nickc@redhat.com>
665 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
667 (image_set_ptr): Likewise.
668 (alpha_vms_fix_sec_rel): Likewise.
669 (alpha_vms_slurp_relocs): Likewise.
671 2017-06-21 Nick Clifton <nickc@redhat.com>
674 * ieee.c (ieee_slurp_sections): Check for a NULL return from
676 (ieee_archive_p): Likewise.
677 (ieee_object_p): Likewise.
679 2017-06-21 Nick Clifton <nickc@redhat.com>
682 * elf.c (setup_group): Zero the group section pointer list after
683 allocation so that loops can be caught. Check for NULL pointers
684 when processing a group list.
686 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
688 * elf-s390.h: New file.
689 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
691 (elf_s390_additional_program_headers): New function.
692 (elf_s390_modify_segment_map): New function.
693 (bfd_elf_s390_set_options): New function.
694 (elf_backend_additional_program_headers)
695 (elf_backend_modify_segment_map): Add macro definitions.
697 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
700 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
701 the DYNAMIC bit instead of bfd_count_sections.
703 2017-06-19 Nick Clifton <nickc@redhat.com>
706 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
708 (evax_bfd_print_eeom): Likewise.
709 (evax_bfd_print_egsd): Check for an overlarge record length.
710 (evax_bfd_print_etir): Likewise.
712 2017-06-19 Nick Clifton <nickc@redhat.com>
715 * libieee.h (struct common_header_type): Add end_p field.
716 * ieee.c (this_byte_and_next): Do not advance input_p beyond
718 (read_id): Check for a length that exceeds the remaining bytes in
720 (ieee_seek): Initialise end_p.
721 (ieee_archive_p): Likewise.
722 (ieee_object_p): Likewise.
724 2017-06-19 Nick Clifton <nickc@redhat.com>
727 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
728 before reading the EIHS structure entries.
730 2017-06-19 Nick Clifton <nickc@redhat.com>
733 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
734 gsd_size. Check that there are enough bytes remaining to read the
735 type and size of the next egsd. Check that the size of the egsd
736 does not exceed the size of the record.
738 2017-06-19 Alan Modra <amodra@gmail.com>
740 * config.bfd: Correct targ_underscore for cris.
742 2017-06-18 Alan Modra <amodra@gmail.com>
744 * config.bfd: Correct targ_underscore for epiphany, ip2k,
745 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
747 2017-06-16 Nick Clifton <nickc@redhat.com>
749 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
750 bucketlist is empty because there are no symbols to add to the
753 2017-06-16 Alan Modra <amodra@gmail.com>
759 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
760 (BFD_JUMP_TABLE_LINK): Likewise.
761 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
762 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
763 (bfd_elf_define_start_stop): New function.
764 * linker.c (bfd_generic_define_start_stop): New function.
765 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
767 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
768 * aout-target.h (MY_bfd_define_start_stop): Define.
769 * aout-tic30.c (MY_bfd_define_start_stop): Define.
770 * binary.c (binary_bfd_define_start_stop): Define.
771 * bout.c (b_out_bfd_define_start_stop): Define.
772 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
773 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
774 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
775 * coffcode.h (coff_bfd_define_start_stop): Define.
776 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
777 * i386msdos.c (msdos_bfd_define_start_stop): Define.
778 * i386os9k.c (os9k_bfd_define_start_stop): Define.
779 * ieee.c (ieee_bfd_define_start_stop): Define.
780 * ihex.c (ihex_bfd_define_start_stop): Define.
781 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
782 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
783 * mmo.c (mmo_bfd_define_start_stop): Define.
784 * nlm-target.h (nlm_bfd_define_start_stop): Define.
785 * oasys.c (oasys_bfd_define_start_stop): Define.
786 * pef.c (bfd_pef_bfd_define_start_stop): Define.
787 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
788 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
789 * som.c (som_bfd_define_start_stop): Define.
790 * srec.c (srec_bfd_define_start_stop): Define.
791 * tekhex.c (tekhex_bfd_define_start_stop): Define.
792 * versados.c (versados_bfd_define_start_stop): Define.
793 * vms-alpha.c (vms_bfd_define_start_stop): Define.
794 (alpha_vms_bfd_define_start_stop): Define.
795 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
796 * bfd-in2.h: Regenerate.
797 * libbfd.h: Regenerate.
799 2017-06-16 Jiong Wang <jiong.wang@arm.com>
801 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
802 SYMBOL_REFERENCES_LOCAL.
804 2017-06-15 Jiong Wang <jiong.wang@arm.com>
807 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
808 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
809 runtime for if there needs copy relocation elimination.
810 (need_copy_relocation_p): New function. Return true for symbol with
811 pc-relative references and if it's against read-only sections.
812 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
813 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
814 that are related with accessing external objects.
815 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
816 in elfNN_aarch64_check_relocs.
818 2017-06-15 Nick Clifton <nickc@redhat.com>
821 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
824 (ieee_archive_p): Likewise.
826 2017-06-15 Nick Clifton <nickc@redhat.com>
829 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
831 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
833 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
834 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
835 keep both windowed and call0 ABI PLT definitions.
836 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
837 elf_xtensa_*_plt_entry endex.
838 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
840 2017-06-14 Nick Clifton <nickc@redhat.com>
843 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
846 2017-06-14 Nick Clifton <nickc@redhat.com>
849 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
850 maximum value for the ascic pointer. Check that name processing
851 does not read beyond this value.
852 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
855 2017-06-14 Nick Clifton <nickc@redhat.com>
858 * versados.c (versados_mkobject): Zero the allocated tdata structure.
859 (process_otr): Check for an invalid offset in the otr structure.
861 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
863 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
865 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
871 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
872 vtable field to a union.
873 (_bfd_elf_is_start_stop): Removed.
874 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
875 __start_SECNAME and __stop_SECNAME symbols.
876 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
877 * elflink.c (_bfd_elf_is_start_stop): Removed.
878 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
879 _bfd_elf_is_start_stop.
880 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
881 __stop_SECNAME symbols. Updated.
882 (elf_gc_smash_unused_vtentry_relocs): Likewise.
883 (bfd_elf_gc_record_vtinherit): Likewise.
884 (bfd_elf_gc_record_vtentry): Likewise.
886 2017-06-13 Nick Clifton <nickc@redhat.com>
889 * elflink.c (elf_link_adjust_relocs): Generate an error when
890 encountering a reloc against a symbol removed by garbage
893 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
895 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
896 to merge_gnu_properties.
897 * elf-properties.c (elf_merge_gnu_properties): Add struct
898 bfd_link_info * and pass it to merge_gnu_properties.
899 (elf_merge_gnu_property_list): Add struct bfd_link_info *
900 and pass it to elf_merge_gnu_properties.
901 (_bfd_elf_link_setup_gnu_properties): Pass info to
902 elf_merge_gnu_property_list.
903 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
905 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
907 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
910 * binary.c (binary_set_section_contents): Scale lma by octets
911 per byte to set filepos.
913 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
915 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
918 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
920 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
923 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
925 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
926 patched section contents for TLS IE reloc.
927 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
929 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
931 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
932 RELOC_FOR_GLOBAL_SYMBOL macro.
934 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
936 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
939 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
941 * config/tc-arc.c (md_undefined_symbol): Changed.
942 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
944 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
946 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
949 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
951 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
952 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
954 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
956 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
959 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
961 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
962 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
963 is non-zero. Add clarifying comments.
965 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
967 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
968 name. Use local IFUNC symbol name string to report unsupported
969 non-PIC call to IFUNC function.
970 (elf_i386_relocate_section): Dump local IFUNC name with minfo
971 when generating R_386_IRELATIVE relocation.
972 (elf_i386_finish_dynamic_symbol): Likewise.
973 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
975 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
976 when generating R_X86_64_IRELATIVE relocation.
977 (elf_x86_64_finish_dynamic_symbol): Likewise.
979 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
981 * elf.c (setup_group): Make sure BFD sections are created for all
982 group sections in the input file when processing SHF_GROUP
984 (bfd_section_from_shdr): Avoid duplicating logic already
985 implemented in `setup_group'.
987 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
990 * peXXigen.c (pe_print_idata): Use the address of the first thunk
991 if the hint address is zero.
993 2017-06-06 James Clarke <jrtc27@jrtc27.com>
996 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
997 ELF_COMMON_DEF_P for common symbols.
999 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1001 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1002 SEC_GROUP sections as SEC_EXCLUDE.
1003 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1004 (assign_section_numbers): Use resolve_section_groups flag instead
1005 of relocatable link type.
1006 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1007 flag instead of checking the final_link flag for part of the
1008 checks in here. Fix white space as a result.
1009 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1010 instead of relocatable link type.
1011 (bfd_elf_final_link): Likewise.
1013 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1015 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1017 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1018 (s3_bfd_score_elf_check_relocs): Likewise.
1019 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1020 (score_elf_final_link_relocate): Likewise.
1021 (s7_bfd_score_elf_check_relocs): Likewise.
1023 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1025 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1028 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1030 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1031 from `reloc_count' rather than decrementing it.
1032 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1033 `reloc_count' by `int_rels_per_ext_rel'.
1034 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1035 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1036 entry determination.
1037 (s3_bfd_score_elf_check_relocs): Likewise.
1038 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1039 (s7_bfd_score_elf_relocate_section): Likewise.
1040 (s7_bfd_score_elf_check_relocs): Likewise.
1041 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1042 prototype and function.
1043 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1044 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1045 triple rather than once the sum of REL and RELA relocation entry
1047 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1048 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1049 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1050 storage allocation size determination.
1051 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1052 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1053 by `int_rels_per_ext_rel' for last relocation entry
1055 (bfd_elf_final_link): Do not multiply `reloc_count' by
1056 `int_rels_per_ext_rel' for internal relocation storage
1057 allocation size determination.
1058 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1059 `int_rels_per_ext_rel' for last relocation entry determination.
1060 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1061 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1062 (_bfd_mips_elf_relocate_section): Likewise.
1064 2017-06-05 Alan Modra <amodra@gmail.com>
1067 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1069 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1071 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1072 determine structure sizes.
1073 (elfcore_grok_freebsd_prstatus): Likewise.
1075 2017-06-01 Alan Modra <amodra@gmail.com>
1077 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1078 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1080 (is_elfv2_localentry0): New function.
1081 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1082 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1083 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1084 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1085 optimized localentry:0 stubs.
1086 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1087 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1089 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1091 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1093 2017-05-30 Casey Smith <clegg89@gmail.com>
1096 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1097 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1099 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1101 * cpu-arc.c (arc_compatible): New function.
1103 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1105 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1107 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1110 * bfdio.c (bfd_get_file_size): New function.
1111 * bfd-in2.h: Regenerated.
1113 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1115 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1118 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1120 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1121 dynobj instead of htab->elf.dynobj.
1123 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1125 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1127 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1128 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1129 actual number of internal relocations retrieved. Adjust
1130 function description.
1131 (bfd_elf64_canonicalize_reloc): Remove macro.
1132 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1134 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1136 * archures.c (bfd_mach_sparc_v9m8): Define.
1137 (bfd_mach_sparc_v8plusm8): Likewise.
1138 (bfd_mach_sparc_v9_p): Adjust to M8.
1139 (bfd_mach_sparc_64bit_p): Likewise.
1140 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1141 bfd_mach_sparc_v8plusm8.
1142 * bfd-in2.h: Regenerated.
1143 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1145 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1146 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1147 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1149 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1150 bfd_mach_sparc_v8plusm8.
1152 2017-05-19 Alan Modra <amodra@gmail.com>
1154 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1155 debug and special sections when no non-note alloc sections in an
1158 2017-05-18 Alan Modra <amodra@gmail.com>
1160 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1161 * elf-m10300.c: Likewise.
1163 * elf32-arc.c: Likewise.
1164 * elf32-bfin.c: Likewise.
1165 * elf32-m68k.c: Likewise.
1166 * elf32-nds32.c: Likewise.
1167 * elf32-tilepro.c: Likewise.
1168 * elflink.c: Likewise.
1169 * elfnn-aarch64.c: Likewise.
1170 * elfnn-riscv.c: Likewise.
1171 * elfxx-tilegx.c: Likewise.
1172 * mach-o.c: Likewise.
1173 * peXXigen.c: Likewise.
1174 * vms-alpha.c: Likewise.
1175 * vms-lib.c: Likewise.
1177 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1180 * elflink.c (elf_gc_mark_debug_section): New function.
1181 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1182 referenced by kept debug sections.
1184 2017-05-16 Alan Modra <amodra@gmail.com>
1186 * elf-m10300.c: Rename occurrences of non_ir_ref.
1187 * elf32-arm.c: Likewise.
1188 * elf32-bfin.c: Likewise.
1189 * elf32-cr16.c: Likewise.
1190 * elf32-cris.c: Likewise.
1191 * elf32-d10v.c: Likewise.
1192 * elf32-dlx.c: Likewise.
1193 * elf32-fr30.c: Likewise.
1194 * elf32-frv.c: Likewise.
1195 * elf32-hppa.c: Likewise.
1196 * elf32-i370.c: Likewise.
1197 * elf32-i386.c: Likewise.
1198 * elf32-iq2000.c: Likewise.
1199 * elf32-lm32.c: Likewise.
1200 * elf32-m32c.c: Likewise.
1201 * elf32-m32r.c: Likewise.
1202 * elf32-m68hc1x.c: Likewise.
1203 * elf32-m68k.c: Likewise.
1204 * elf32-mcore.c: Likewise.
1205 * elf32-metag.c: Likewise.
1206 * elf32-microblaze.c: Likewise.
1207 * elf32-moxie.c: Likewise.
1208 * elf32-msp430.c: Likewise.
1209 * elf32-mt.c: Likewise.
1210 * elf32-nios2.c: Likewise.
1211 * elf32-or1k.c: Likewise.
1212 * elf32-ppc.c: Likewise.
1213 * elf32-rl78.c: Likewise.
1214 * elf32-s390.c: Likewise.
1215 * elf32-score.c: Likewise.
1216 * elf32-score7.c: Likewise.
1217 * elf32-sh.c: Likewise.
1218 * elf32-tic6x.c: Likewise.
1219 * elf32-tilepro.c: Likewise.
1220 * elf32-v850.c: Likewise.
1221 * elf32-vax.c: Likewise.
1222 * elf32-xstormy16.c: Likewise.
1223 * elf32-xtensa.c: Likewise.
1224 * elf64-alpha.c: Likewise.
1225 * elf64-hppa.c: Likewise.
1226 * elf64-ia64-vms.c: Likewise.
1227 * elf64-mmix.c: Likewise.
1228 * elf64-ppc.c: Likewise.
1229 * elf64-s390.c: Likewise.
1230 * elf64-sh64.c: Likewise.
1231 * elf64-x86-64.c: Likewise.
1232 * elflink.c: Likewise.
1233 * elfnn-aarch64.c: Likewise.
1234 * elfnn-ia64.c: Likewise.
1235 * elfnn-riscv.c: Likewise.
1236 * elfxx-mips.c: Likewise.
1237 * elfxx-sparc.c: Likewise.
1238 * elfxx-tilegx.c: Likewise.
1239 * linker.c: Likewise.
1241 2017-05-16 Alan Modra <amodra@gmail.com>
1243 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1244 * elflink.c (elf_link_add_object_symbols): Update to use
1246 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1248 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1250 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1252 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1254 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1256 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1257 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1259 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1261 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1263 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1265 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1266 to plt_second/plt_second_eh_frame.
1267 (elf_x86_64_link_hash_newfunc): Updated.
1268 (elf_x86_64_allocate_dynrelocs): Likewise.
1269 (elf_x86_64_size_dynamic_sections): Likewise.
1270 (elf_x86_64_relocate_section): Likewise.
1271 (elf_x86_64_finish_dynamic_symbol): Likewise.
1272 (elf_x86_64_finish_dynamic_sections): Likewise.
1273 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1274 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1276 (elf_backend_setup_gnu_properties): Updated. Create the
1277 .plt.sec section instead of the .plt.sec section.
1279 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1281 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1282 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1283 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1285 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1287 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1288 (bfd_elf64_set_reloc): Define.
1289 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1291 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1293 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1294 (struct bfd_target): New field _bfd_set_reloc.
1295 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1296 * reloc.c (_bfd_generic_set_reloc): New function.
1297 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1298 * nlm-target.h (nlm_set_reloc): Likewise.
1299 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1300 * aout-tic30.c (MY_set_reloc): Likewise.
1301 * aout-target.h (MY_set_reloc): Likewise.
1302 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1303 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1304 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1305 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1306 * aout-adobe.c (aout_32_set_reloc): Likewise.
1307 * bout.c (b_out_set_reloc): Likewise.
1308 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1309 * i386os9k.c (aout_32_set_reloc): Likewise.
1310 * ieee.c (ieee_set_reloc): Likewise.
1311 * oasys.c (oasys_set_reloc): Likewise.
1312 * som.c (som_set_reloc): Likewise.
1313 * versados.c (versados_set_reloc): Likewise.
1314 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1315 _bfd_generic_set_reloc.
1316 (rs6000_xcoff64_aix_vec): LIkewise.
1317 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1318 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1319 * i386msdos.c (msdos_set_reloc): Define to
1320 _bfd_norelocs_set_reloc.
1321 * elfcode.h (elf_set_reloc): Define.
1322 * bfd-in2.h: Regenerated.
1324 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1327 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1328 for IFUNC function address.
1330 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1332 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1333 (CONFLICT_LIST): Likewise.
1334 (opcode/arc-attrs.h): Include.
1335 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1336 (arc_extract_features): New file.
1337 (arc_stralloc): Likewise.
1338 (arc_elf_merge_attributes): Likewise.
1339 (arc_elf_merge_private_bfd_data): Use object attributes.
1340 (bfd_arc_get_mach_from_attributes): New function.
1341 (arc_elf_object_p): Use object attributes.
1342 (arc_elf_final_write_processing): Likewise.
1343 (elf32_arc_obj_attrs_arg_type): New function.
1344 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1345 (elf32_arc_section_from_shdr): Likewise.
1346 (elf_backend_obj_attrs_vendor): Define.
1347 (elf_backend_obj_attrs_section): Likewise.
1348 (elf_backend_obj_attrs_arg_type): Likewise.
1349 (elf_backend_obj_attrs_section_type): Likewise.
1350 (elf_backend_obj_attrs_handle_unknown): Likewise.
1351 (elf_backend_section_from_shdr): Likewise.
1353 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1356 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1357 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1358 and the destination is a Thumb symbol.
1360 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1362 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1363 initializer to silence GCC 4.2.
1364 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1366 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1368 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1369 (LAZY_PLT_ENTRY_SIZE): This.
1370 (NON_LAZY_PLT_ENTRY_SIZE): New.
1371 (elf_x86_64_plt0_entry): Renamed to ...
1372 (elf_x86_64_lazy_plt0_entry): This.
1373 (elf_x86_64_plt_entry): Renamed to ...
1374 (elf_x86_64_lazy_plt_entry): This.
1375 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1376 (elf_x86_64_lazy_bnd_plt0_entry): This.
1377 (elf_x86_64_legacy_plt_entry): Removed.
1378 (elf_x86_64_bnd_plt_entry): Renamed to ...
1379 (elf_x86_64_lazy_bnd_plt_entry): This.
1380 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1381 (elf_x86_64_non_lazy_plt_entry): This.
1382 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1383 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1384 (elf_x86_64_eh_frame_plt): Renamed to ...
1385 (elf_x86_64_eh_frame_lazy_plt): This.
1386 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1387 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1388 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1389 (elf_x86_64_eh_frame_non_lazy_plt): This.
1390 (elf_x86_64_lazy_plt_layout): New.
1391 (elf_x86_64_non_lazy_plt_layout): Likewise.
1392 (elf_x86_64_plt_layout): Likewise.
1393 (elf_x86_64_backend_data): Remove PLT layout information. Add
1394 os for target system.
1395 (GET_PLT_ENTRY_SIZE): Removed.
1396 (elf_x86_64_lazy_plt): New.
1397 (elf_x86_64_non_lazy_plt): Likewise.
1398 (elf_x86_64_lazy_bnd_plt): Likewise.
1399 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1400 (elf_x86-64_arch_bed): Updated.
1401 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1402 (elf_x86_64_create_dynamic_sections): Removed.
1403 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1404 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1405 (elf_x86-64_adjust_dynamic_symbol): Updated.
1406 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1407 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1408 size for PLT0 if there is no PLT0. Get plt_entry_size from
1409 non_lazy_plt for non-lazy PLT entries.
1410 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1411 from non_lazy_plt for non-lazy PLT entries.
1412 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1413 if there is no PLT0.
1414 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1415 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1416 entries with non-lazy PLT layout. Don't fill the second and third
1417 slots in the PLT entry if there is no PLT0.
1418 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1419 if there is no PLT0. Set sh_entsize on the .plt.got section.
1420 (compare_relocs): New.
1421 (elf_x86_64_plt_type): Likewise.
1422 (elf_x86_64_plt): Likewise.
1423 (elf_x86_64_nacl_plt): New. Forward declaration.
1424 (elf_x86_64_get_plt_sym_val): Removed.
1425 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1426 against all dynamic relocations.
1427 (elf_x86_64_link_setup_gnu_properties): New function.
1428 (elf_backend_create_dynamic_sections): Updated.
1429 (elf_backend_setup_gnu_properties): New.
1430 (elf_x86_64_nacl_plt): New.
1431 (elf_x86_64_nacl_arch_bed): Updated.
1433 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1435 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1436 (LAZY_PLT_ENTRY_SIZE): This.
1437 (NON_LAZY_PLT_ENTRY_SIZE): New.
1438 (elf_i386_plt0_entry): Renamed to ...
1439 (elf_i386_lazy_plt0_entry): This.
1440 (elf_i386_plt_entry): Renamed to ...
1441 (elf_i386_lazy_plt_entry): This.
1442 (elf_i386_pic_plt0_entry): Renamed to ...
1443 (elf_i386_pic_lazy_plt0_entry): This.
1444 (elf_i386_pic_plt_entry): Renamed to ...
1445 (elf_i386_pic_lazy_plt_entry): This.
1446 (elf_i386_got_plt_entry): Renamed to ...
1447 (elf_i386_non_lazy_plt_entry): This.
1448 (elf_i386_pic_got_plt_entry): Renamed to ...
1449 (elf_i386_pic_non_lazy_plt_entry): This.
1450 (elf_i386_eh_frame_plt): Renamed to ...
1451 (elf_i386_eh_frame_lazy_plt): This.
1452 (elf_i386_eh_frame_plt_got): Renamed to ...
1453 (elf_i386_eh_frame_non_lazy_plt): This.
1454 (elf_i386_plt_layout): Renamed to ...
1455 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1456 eh_frame_plt_got_size.
1457 (elf_i386_non_lazy_plt_layout): New.
1458 (elf_i386_plt_layout): Likewise.
1459 (elf_i386_non_lazy_plt): Likewise.
1460 (GET_PLT_ENTRY_SIZE): Removed.
1461 (elf_i386_plt): Renamed to ...
1462 (elf_i386_lazy_plt): This.
1463 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1464 (elf_i386_arch_bed): Updated.
1465 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1466 (elf_i386_create_dynamic_sections): Removed.
1467 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1468 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1469 (elf_i386_adjust_dynamic_symbol): Updated.
1470 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1471 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1472 size for PLT0 if there is no PLT0.
1473 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1474 output section is discarded only if GOT isn't empty.
1475 (elf_i386_relocate_section): Updated. Properly get PLT index
1476 if there is no PLT0.
1477 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1478 second and third slots in the PLT entry if there is no PLT0.
1479 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1480 if there is no PLT0. Set sh_entsize on the .plt.got section.
1481 (elf_i386_nacl_plt): Forward declaration.
1482 (elf_i386_get_plt_sym_val): Removed.
1483 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1484 against all dynamic relocations.
1485 (elf_i386_link_setup_gnu_properties): New function.
1486 (elf_backend_create_dynamic_sections): Updated.
1487 (elf_backend_setup_gnu_properties): New.
1488 (elf_i386_nacl_plt): Updated.
1489 (elf_i386_nacl_arch_bed): Likewise.
1490 (elf_i386_vxworks_arch_bed): Likewise.
1492 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1494 * elflink.c (elf_output_implib): Remove executable flag from import
1496 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1497 library is a relocatable object file.
1499 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1502 * elf32-avr.c (avr_should_move_sym): New function.
1503 (avr_should_reduce_sym_size): Likewise.
1504 (avr_should_increase_sym_size): Likewise.
1505 (elf32_avr_relax_delete_bytes): Adjust symbol values
1506 and sizes by calling new functions.
1508 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1510 * config.bfd (riscv32-*): Enable rv64.
1512 2017-05-02 Alan Modra <amodra@gmail.com>
1515 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1516 rather than h->root.type == bfd_link_hash_new.
1517 (bfd_elf_record_link_assignment): Similarly, call
1518 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1520 2017-04-29 Alan Modra <amodra@gmail.com>
1523 * reloc.c (reloc_offset_in_range): New function.
1524 (bfd_perform_relocation, bfd_install_relocation): Use it.
1525 (_bfd_final_link_relocate): Likewise.
1527 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1529 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1530 before using .plt.got.
1531 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1533 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1535 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1536 instead of "+=" to update 0.
1538 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1540 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1541 .plt.got section here.
1542 (elf_i386_check_relocs): Don't create the .plt.got section.
1543 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1544 the .plt.got and .plt.bnd sections here.
1545 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1548 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1550 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1552 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1553 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1554 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1555 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1558 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1560 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1562 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1563 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1564 the first relocatable ELF input with GNU properties.
1566 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1568 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1569 VxWorks for non-PIC.
1571 2017-04-27 Alan Modra <amodra@gmail.com>
1573 * elf-bfd.h (struct elf_backend_data): Make asection param of
1574 elf_backend_eh_frame_address_size const.
1575 (_bfd_elf_eh_frame_address_size): Likewise.
1576 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1577 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1578 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1579 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1580 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1581 (next_cie_fde_offset): Constify params.
1582 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1584 2017-04-27 Alan Modra <amodra@gmail.com>
1586 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1587 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1588 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1590 (offset_adjust): New function.
1591 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1592 (adjust_eh_frame_local_symbols): Likewise.
1593 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1594 after changing anything. Return true if anything changed.
1595 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1596 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1598 2017-04-27 Alan Modra <amodra@gmail.com>
1600 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1603 2017-04-27 Alan Modra <amodra@gmail.com>
1605 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1606 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1607 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1608 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1609 for undef and undefweak dyn_relocs.
1610 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1611 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1612 (allocate_got, allocate_dynrelocs): Likewise.
1613 (ppc64_elf_relocate_section): Likewise.
1615 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1617 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1618 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1619 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1620 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1622 2017-04-26 Nick Clifton <nickc@redhat.com>
1625 * reloc.c (bfd_perform_relocation): Check for a negative address
1628 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1631 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1633 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1634 (elf_backend_always_renumber_dynsyms): Define.
1635 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1636 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1637 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1638 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1640 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1642 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1644 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1645 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1646 sections have been created.
1648 2017-04-26 Nick Clifton <nickc@redhat.com>
1651 * compress.c (bfd_init_section_compress_status): Check the return
1652 value from bfd_malloc.
1654 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1656 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1657 no_finish_dynamic_symbol.
1658 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1660 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1661 weak symbol, don't make it dynamic.
1662 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1663 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1664 relocation for GOT reference.
1665 (elf_x86_64_finish_dynamic_symbol): Abort if
1666 no_finish_dynamic_symbol isn't 0.
1668 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1671 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1672 undefined weak symbol, don't make it dynamic.
1673 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1674 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1675 relocation for R_386_GOT32.
1677 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1680 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1682 2017-04-23 Alan Modra <amodra@gmail.com>
1685 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1686 * elf.c (lcomm_sym): New.
1687 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1688 * bfd-in2.h: Regenerate.
1690 2017-04-23 Alan Modra <amodra@gmail.com>
1693 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1694 parameters and comment.
1695 (_bfd_elf_get_reloc_section): Delete.
1696 (_bfd_elf_plt_get_reloc_section): Declare.
1697 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1698 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1700 (_bfd_elf_get_reloc_section): ..here. Delete.
1701 (assign_section_numbers): Call elf_get_reloc_section.
1702 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1703 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1705 2017-04-23 Alan Modra <amodra@gmail.com>
1708 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1711 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1714 * elf32-i386.c (elf_i386_link_hash_entry): Add
1715 no_finish_dynamic_symbol.
1716 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1717 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1718 symbol, don't make it dynamic in PIE.
1719 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1720 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1721 relocation for R_386_GOT32
1722 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1725 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1729 * elflink.c (elf_link_add_object_symbols): Require
1730 --no-dynamic-linker with -E/--dynamic-list when creating
1733 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1735 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1738 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1740 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1741 dynamic symbol sorting.
1743 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1746 * elflink.c (elf_link_add_object_symbols): Preserve
1747 dynamic_ref_after_ir_def when restoring the symbol table for
1748 unneeded dynamic object.
1750 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1753 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1754 on on undefined IFUNC symbol in the second PLT.
1756 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1758 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1760 2017-04-19 Alan Modra <amodra@gmail.com>
1762 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1763 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1764 * elf32-ppc.c:Formatting.
1765 (ensure_undefweak_dynamic): Don't make dynamic when
1766 info->dynamic_undefined_weak is zero.
1767 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1768 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1769 not default visibility. Discard undef and undefweak
1771 (ppc_elf_relocate_section): Adjust to suit.
1772 * elf64-ppc.c: Formatting.
1773 (ensure_undefweak_dynamic): Don't make dynamic when
1774 info->dynamic_undefined_weak is zero.
1775 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1776 info->dynamic_undefined_weak. Discard them earlier.
1778 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1781 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1782 before generating the version definition section.
1784 2017-04-17 Alan Modra <amodra@gmail.com>
1786 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1787 state when a regular object file defines a symbol with
1788 incompatible type to that defined by an earlier shared lib.
1790 2017-04-13 Alan Modra <amodra@gmail.com>
1792 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1794 * elf32-arm.c: Likewise.
1795 * elf32-i386.c: Likewise.
1796 * elf32-mep.c: Likewise.
1797 * elf64-ia64-vms.c: Likewise.
1798 * elf64-x86-64.c: Likewise.
1799 * elflink.c: Likewise.
1800 * elfnn-ia64.c: Likewise.
1801 * elfxx-mips.c: Likewise.
1803 2017-04-13 Alan Modra <amodra@gmail.com>
1805 * aoutx.h: Use %B and %A in error messages throughout file.
1806 * aout-cris.c: Likewise.
1807 * archive.c: Likewise.
1808 * binary.c: Likewise.
1809 * coff-rs6000.c: Likewise.
1810 * coff-tic4x.c: Likewise.
1811 * coffcode.h: Likewise.
1812 * coffgen.c: Likewise.
1813 * cofflink.c: Likewise.
1814 * coffswap.h: Likewise.
1815 * cpu-arm.c: Likewise.
1816 * elf-eh-frame.c: Likewise.
1817 * elf-m10300.c: Likewise.
1819 * elf32-arc.c: Likewise.
1820 * elf32-arm.c: Likewise.
1821 * elf32-bfin.c: Likewise.
1822 * elf32-frv.c: Likewise.
1823 * elf32-iq2000.c: Likewise.
1824 * elf32-m32c.c: Likewise.
1825 * elf32-microblaze.c: Likewise.
1826 * elf32-nds32.c: Likewise.
1827 * elf32-rl78.c: Likewise.
1828 * elf32-rx.c: Likewise.
1829 * elf32-score.c: Likewise.
1830 * elf32-score7.c: Likewise.
1831 * elf32-sh64.c: Likewise.
1832 * elf32-v850.c: Likewise.
1833 * elf32-vax.c: Likewise.
1834 * elf32-visium.c: Likewise.
1835 * elf64-ia64-vms.c: Likewise.
1836 * elf64-mmix.c: Likewise.
1837 * elf64-sh64.c: Likewise.
1838 * elfcode.h: Likewise.
1839 * elfnn-aarch64.c: Likewise.
1840 * elfnn-ia64.c: Likewise.
1841 * elfxx-mips.c: Likewise.
1842 * hpux-core.c: Likewise.
1845 * linker.c: Likewise.
1846 * merge.c: Likewise.
1848 * oasys.c: Likewise.
1849 * pdp11.c: Likewise.
1850 * peXXigen.c: Likewise.
1851 * rs6000-core.c: Likewise.
1852 * vms-alpha.c: Likewise.
1853 * xcofflink.c: Likewise.
1855 2017-04-13 Alan Modra <amodra@gmail.com>
1857 * bfd.c (PRINT_TYPE): Define.
1858 (_doprnt): New function.
1859 (error_handler_internal): Use _doprnt.
1860 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1861 calls in their natural order, throughout file.
1862 * coff-mcore.c: Likewise.
1863 * coff-ppc.c: Likewise.
1864 * coff-tic80.c: Likewise.
1865 * cofflink.c: Likewise.
1866 * elf-s390-common.c: Likewise.
1868 * elf32-arm.c: Likewise.
1869 * elf32-i386.c: Likewise.
1870 * elf32-m32r.c: Likewise.
1871 * elf32-msp430.c: Likewise.
1872 * elf32-spu.c: Likewise.
1873 * elf64-ia64-vms.c: Likewise.
1874 * elf64-sparc.c: Likewise.
1875 * elf64-x86-64.c: Likewise.
1876 * elflink.c: Likewise.
1877 * elfnn-aarch64.c: Likewise.
1878 * elfnn-ia64.c: Likewise.
1879 * elfxx-mips.c: Likewise.
1881 2017-04-13 Alan Modra <amodra@gmail.com>
1883 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1884 branch veneers" error. Fix double space and format message.
1885 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1886 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1888 2017-04-13 Alan Modra <amodra@gmail.com>
1890 * bfd-in2.h: Regenerate.
1892 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1894 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1895 extra `\n' in warning/error messages.
1896 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1897 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1899 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1901 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1902 processor-specific properties with generic ELF target vector.
1904 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1906 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1907 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1908 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1909 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1911 (link_hash_newfunc): Initialize has_got_reloc and
1913 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1915 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1917 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1919 (_bfd_sparc_elf_fixup_symbol): New function.
1920 (allocate_dynrelocs): Don't allocate space for dynamic
1921 relocations and discard relocations against resolved undefined
1922 weak symbols in executable. Don't make resolved undefined weak
1923 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1924 relocation against undefined weak symbols in PIE.
1925 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1926 relocations against resolved undefined weak symbols in PIE
1927 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1928 without ynamic PLT/GOT relocations for resolved undefined weak
1930 Don't generate dynamic relocation against resolved undefined
1931 weak symbol in executable.
1932 (pie_finish_undefweak_symbol): New function.
1933 (_bfd_sparc_elf_finish_dynamic_sections): Call
1934 pie_finish_undefweak_symbol on all symbols in PIE.
1935 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1936 (_bfd_sparc_elf_fixup_symbol): New function.
1938 2017-04-10 Nick Clifton <nickc@redhat.com>
1940 * config.bfd: Remove ns32k from obsolete list.
1942 2017-04-10 Alan Modra <amodra@gmail.com>
1945 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1946 (special_sections_i): Likewise for .init_array.
1947 (special_sections_p): Likewise for .preinit_array.
1949 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1953 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1954 ELF_COMMON_DEF_P for common symbols.
1955 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1956 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1957 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1958 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1959 07492f668d2173da7a2bda3707ff0985e0f460b6.
1961 2017-04-07 Pedro Alves <palves@redhat.com>
1963 * opncls.c (bfd_get_debug_link_info): Rename to...
1964 (bfd_get_debug_link_info_1): ... this. Change type of second
1965 parameter to void pointer. Adjust.
1966 (bfd_get_debug_link_info): Reimplement on top of
1967 bfd_get_debug_link_info_1.
1968 (separate_debug_file_exists, separate_alt_debug_file_exists):
1969 Change type of second parameter to void pointer. Adjust.
1970 (get_func_type, check_func_type): Change type of second parameter
1972 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1973 the callback functions instead of passing the address of a local.
1974 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1975 find_separate_debug_file.
1976 (get_alt_debug_link_info_shim): Change type of second parameter to
1977 void pointer. Adjust.
1978 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1979 find_separate_debug_file.
1980 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1981 of second parameter to void pointer. Adjust.
1982 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1983 pointer local to find_separate_debug_file.
1985 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1987 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1988 external symbols with a definition.
1989 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1991 2017-04-07 Alan Modra <amodra@gmail.com>
1993 * po/SRC-POTFILES.in: Regenerate.
1995 2017-04-05 Alan Modra <amodra@gmail.com>
1997 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2000 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2002 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2003 numbers for DataDirectory entry indicies passed to
2006 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2008 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2009 each GNU_MBIND section and align GNU_MBIND section to page size.
2010 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2011 segment for each GNU_MBIND section.
2012 (_bfd_elf_init_private_section_data): Copy sh_info from input
2013 for GNU_MBIND section.
2015 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2017 * elfnn-riscv.c (GP_NAME): Delete.
2018 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2019 (_bfd_riscv_relax_lui): Likewise.
2021 2017-04-04 Nick Clifton <nickc@redhat.com>
2024 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2026 (bfd_elf_final_link): Only initialize the extended symbol index
2027 section if there are extended symbol tables to list.
2029 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2031 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2032 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2033 * configure.ac (elf): Add elf-properties.lo.
2034 * Makefile.in: Regenerated.
2035 * configure: Likewise.
2036 * elf-bfd.h (elf_property_kind): New.
2037 (elf_property): Likewise.
2038 (elf_property_list): Likewise.
2039 (elf_properties): Likewise.
2040 (_bfd_elf_parse_gnu_properties): Likewise.
2041 (_bfd_elf_get_property): Likewise.
2042 (_bfd_elf_link_setup_gnu_properties): Likewise.
2043 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2044 and setup_gnu_properties.
2045 (elf_obj_tdata): Add properties.
2046 * elf-properties.c: New file.
2047 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2048 (elf_i386_merge_gnu_properties): Likewise.
2049 (elf_backend_parse_gnu_properties): Likewise.
2050 (elf_backend_merge_gnu_properties): Likewise.
2051 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2052 (elf_x86_64_merge_gnu_properties): Likewise.
2053 (elf_backend_parse_gnu_properties): Likewise.
2054 (elf_backend_merge_gnu_properties): Likewise.
2055 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2056 (elf_backend_parse_gnu_properties): Likewise.
2057 (elf_backend_setup_gnu_properties): Likewise.
2058 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2059 elf_backend_merge_gnu_properties and
2060 elf_backend_setup_gnu_properties.
2062 2017-03-30 Pip Cet <pipcet@gmail.com>
2064 * elf32-wasm32.c: Add relocation code, two relocs.
2065 * reloc.c: Add wasm32 relocations.
2066 * libbfd.h: Regenerate.
2067 * bfd-in2.h: Regenerate.
2068 * bfd/po/bfd.pot: Regenerate.
2070 2017-03-29 Nick Clifton <nickc@redhat.com>
2073 * coff-bfd.h (struct coff_section_data): Add new fields:
2074 saved_bias and bias.
2075 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2076 computed for PE binaries.
2077 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2080 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2083 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2084 to handle a local symbol with a hash-symbol-entry; without PLT.
2085 Add BFD_ASSERT for an incidental case with GOT entry present.
2086 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2087 isn't forced-or-set local.
2089 2017-03-27 Pip Cet <pipcet@gmail.com>
2091 * wasm-module.c: New file to support WebAssembly modules.
2092 * wasm-module.h: New file to support WebAssembly modules.
2093 * doc/webassembly.texi: Start documenting wasm-module.c.
2094 * config.bfd: Add wasm_vec.
2095 * targets.c: Likewise.
2096 * configure.ac: Likewise.
2097 * Makefile.am: Add entries for wasm-module.c.
2098 * Makefile.in: Regenerate.
2099 * configure: Regenerate.
2100 * po/SRC-POTFILES.in: Regenerate.
2102 2017-03-27 Pip Cet <pipcet@gmail.com>
2104 * cpu-wasm32.c: New file to support wasm32 architecture.
2105 * elf32-wasm32.c: New file to support wasm32 architecture.
2106 * Makefile.am: Add wasm32 architecture.
2107 * archures.c: Likewise.
2108 * config.bfd: Likewise.
2109 * configure.ac: Likewise.
2110 * targets.c: Likewise.
2111 * Makefile.in: Regenerate.
2112 * bfd-in2.h: Regenerate.
2113 * configure: Regenerate.
2114 * po/SRC-POTFILES.in: Regenerate.
2116 2017-03-20 Alan Modra <amodra@gmail.com>
2119 * elf64-ppc.c (compare_symbols): Stabilize sort.
2121 2017-03-18 Alan Modra <amodra@gmail.com>
2123 * elf64-ppc.c (struct ppc_link_hash_table): Add
2124 local_ifunc_resolver and maybe_local_ifunc_resolver.
2125 (ppc_build_one_stub): Set flags on emitting dynamic
2126 relocation to ifunc.
2127 (ppc64_elf_relocate_section): Likewise.
2128 (ppc64_elf_finish_dynamic_symbol): Likewise.
2129 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2130 local dynamic relocs to ifuncs.
2131 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2132 local_ifunc_resolver and maybe_local_ifunc_resolver.
2133 (ppc_elf_relocate_section): Set flag on emitting dynamic
2134 relocation to ifuncs.
2135 (ppc_elf_finish_dynamic_symbol): Likewise.
2136 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2137 dynamic relocs to ifuncs.
2139 2017-03-13 Nick Clifton <nickc@redhat.com>
2142 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2143 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2144 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2145 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2146 * bfd-in2.h: Regenerate.
2147 * libbfd.h: Regenerate.
2148 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2150 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2151 (elfNN_aarch64_howto_table): Likewise.
2152 (aarch64_tls_transition_without_check): Likewise.
2153 (aarch64_reloc_got_type): Likewise.
2154 (elfNN_aarch64_final_link_relocate): Likewise.
2155 (elfNN_aarch64_tls_relax): Likewise.
2156 (elfNN_aarch64_relocate_section): Likewise.
2157 (elfNN_aarch64_gc_sweep_hook): Likewise.
2158 (elfNN_aarch64_check_relocs): Likewise.
2159 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2160 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2162 2017-03-11 Alan Modra <amodra@gmail.com>
2164 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2165 parameter is in fact used. Whitespace fixes.
2166 * elf64-ppc.c: Likewise.
2168 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2170 * rs6000-core.c (CORE_NEW): Simplify macro when
2171 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2173 2017-03-07 Alan Modra <amodra@gmail.com>
2177 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2180 2017-03-05 Alan Modra <amodra@gmail.com>
2182 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2183 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2184 (next_cie_fde_offset): New function.
2185 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2186 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2187 four bytes. Align CIEs to four or eight bytes depending on
2188 per_encoding_aligned8. Align FDEs according to their encoding.
2189 Pad last FDE to output section alignment.
2190 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2192 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2193 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2194 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2196 2017-03-02 Martin Bickel <binutils@ineranves.de>
2199 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2200 empty segments which have a zero filesz, but a non-zero memsz.
2202 2017-03-02 Alan Modra <amodra@gmail.com>
2204 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2206 2017-02-28 Alan Modra <amodra@gmail.com>
2208 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2209 (ppc64_elf_relocate_section): Likewise.
2211 2017-02-28 Alan Modra <amodra@gmail.com>
2214 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2215 rather than elf32_nios2_hash_table or elf_hash_table.
2216 (create_got_section): Likewise.
2217 (nios2_elf32_finish_dynamic_symbol): Likewise.
2218 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2219 (nios2_elf32_size_dynamic_sections): Likewise.
2220 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2221 vars. Use htab equivalents directly instead. Don't create
2222 all dynamic sections on needing just the GOT. Use a goto
2223 rather than a fall-through with reloc test. Ensure
2224 htab->dynobj is set when making dynamic sreloc section.
2225 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2226 equivalent directly instead. Don't segfault on looking for
2227 .dynamic when dynamic sections have not been created. Don't
2228 segfault on .got.plt being discarded.
2229 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2230 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2231 fixme and another not so relevant comment.
2232 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2233 already set, set hash table dynobj on creating .sbss.
2235 2017-02-28 Alan Modra <amodra@gmail.com>
2237 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2238 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2239 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2240 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2241 (ppc64_elf_relocate_section): Likewise.
2242 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2243 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2244 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2245 * libbfd.h: Regenerate.
2246 * bfd-in2.h: Regenerate.
2248 2017-02-28 Alan Modra <amodra@gmail.com>
2250 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2251 dynamic .data.rel.ro read-only.
2252 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2253 rather than section flags when deciding where copy reloc goes.
2254 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2255 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2256 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2257 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2258 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2259 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2260 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2261 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2262 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2263 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2264 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2265 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2266 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2267 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2268 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2269 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2270 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2271 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2272 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2274 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2276 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2277 `jalr $0, $25' instruction encoding.
2279 2017-02-27 Nick Clifton <nickc@redhat.com>
2282 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2283 generating a seg-fault when encountering a symbol that has been
2284 deleted by garbage collection.
2286 2017-02-25 Alan Modra <amodra@gmail.com>
2288 * elf32-arc.c (struct dynamic_sections): Delete.
2289 (enum dyn_section_types): Delete.
2290 (dyn_section_names): Delete.
2291 (arc_create_dynamic_sections): Delete.
2292 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2293 segfault on discarded .rela.plt section.
2294 (elf_arc_size_dynamic_sections): Formatting. Don't call
2295 arc_create_dynamic_sections. Don't allocate memory for sections
2296 handled by the generic linker. Correct code finding relocs in
2297 read-only sections. Set SEC_EXCLUDE on zero size .got,
2298 .got.plt, and .dynbss sections. Do set .interp for pies.
2300 2017-02-24 Andrew Waterman <andrew@sifive.com>
2302 * elfnn-riscv.c (GP_NAME): New macro.
2303 (riscv_global_pointer_value): Use it.
2304 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2305 output section, consider only that section's alignment.
2307 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2309 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2310 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2311 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2312 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2314 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2316 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2317 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2320 2017-02-23 Alan Modra <amodra@gmail.com>
2323 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2325 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2326 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2329 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2332 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2333 processing ahead of the call to `elf_gc_sweep_symbol'.
2335 2017-02-22 Nick Clifton <nickc@redhat.com>
2338 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2339 created section 4-byte alignment.
2341 2017-02-22 Alan Modra <amodra@gmail.com>
2343 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2344 on .got or .plt output section being discarded by script.
2345 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2348 2017-02-21 Alan Modra <amodra@gmail.com>
2350 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2351 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2353 2017-02-20 Alan Modra <amodra@gmail.com>
2356 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2357 if DT_RELSZ/DT_RELASZ is zero.
2359 2017-02-17 Nick Clifton <nickc@redhat.com>
2361 * compress.c (bfd_get_full_section_contents): Remember to reduce
2362 compressed size by the sizeof the compression header when
2363 decompressing the contents.
2365 2017-02-17 Pedro Alves <palves@redhat.com>
2367 * srec.c (Chunk): Rename to ...
2368 (_bfd_srec_len): ... this.
2369 (S3Forced): Rename to ...
2370 (_bfd_srec_forceS3): ... this.
2371 * objcopy.c: Adjust all references.
2373 2017-02-17 Pedro Alves <palves@redhat.com>
2375 * archive.c (bsd_write_armap): Rename to ...
2376 (_bfd_bsd_write_armap): ... this.
2377 (coff_write_armap): Rename to ...
2378 (_bfd_coff_write_armap): ... this.
2379 * libbfd-in.h (bsd_write_armap): Rename to ...
2380 (_bfd_bsd_write_armap): ... this.
2381 (coff_write_armap): Rename to ...
2382 (_bfd_coff_write_armap): ... this.
2383 * aout-target.h, aout-tic30.c: Adjust all users.
2384 * libbfd.h: Regenerate.
2386 2017-02-17 Pedro Alves <palves@redhat.com>
2388 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2389 (warn_deprecated): Rename to ...
2390 (_bfd_warn_deprecated): ... this.
2391 * libbfd.c (warn_deprecated): Rename to ...
2392 (_bfd_warn_deprecated): ... this.
2393 * bfd-in2.h: Regenerate.
2395 2017-02-17 Pedro Alves <palves@redhat.com>
2397 * bfdio.c (real_ftell): Rename to ...
2398 (_bfd_real_ftell): ... this.
2399 (real_fseek): Rename to ...
2400 (_bfd_real_fseek): ... this.
2401 (real_fopen): Rename to ...
2402 (_bfd_real_fopen): ... this.
2403 * libbfd-in.h (real_ftell): Rename to ...
2404 (_bfd_real_ftell): ... this.
2405 (real_fseek): Rename to ...
2406 (_bfd_real_fseek): ... this.
2407 (real_fopen): Rename to ...
2408 (_bfd_real_fopen): ... this.
2409 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2410 * libbfd.h: Regenerate.
2412 2017-02-17 Pedro Alves <palves@redhat.com>
2414 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2415 * libbfd.c (read_unsigned_leb128): Rename to ...
2416 (_bfd_read_unsigned_leb128): ... this.
2417 (read_signed_leb128): Rename to ...
2418 (_bfd_read_signed_leb128): ... this.
2419 (safe_read_leb128): Rename to ...
2420 (_bfd_safe_read_leb128): ... this.
2421 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2422 (_bfd_read_unsigned_leb128): ... this.
2423 (read_signed_leb128): Rename to ...
2424 (_bfd_read_signed_leb128): ... this.
2425 (safe_read_leb128): Rename to ...
2426 (_bfd_safe_read_leb128): ... this.
2427 * libbfd.h: Renegerate.
2429 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2431 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2432 before trying to fine matching file and line information.
2434 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2436 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2437 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2438 not match current bfd, then reload debug information. Record bfd
2439 we're loading debug info for in the stash. If we have debug
2440 informatin in the cache then perform section placement before
2443 2017-02-16 Alan Modra <amodra@gmail.com>
2446 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2447 * elfxx-target.h (elf_backend_no_page_alias): Define.
2448 (elfNN_bed): Init new field.
2449 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2450 ensure PT_LOAD segment starts on a new page.
2451 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2453 2017-02-16 Alan Modra <amodra@gmail.com>
2456 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2459 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2461 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2462 * bfd-in2.h: Regenerated.
2464 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2467 * elf32-i386.c (elf_i386_relocate_section): Allow
2468 "lea foo@GOT, %reg" in PIC.
2470 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2473 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2474 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2475 error against local IFUNC symbol without a base register for
2478 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2480 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2481 `%P: %H:' with `info->callbacks->einfo'.
2482 (ppc_elf_relocate_section): Likewise.
2483 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2484 (ppc64_elf_edit_toc): Likewise.
2485 (ppc64_elf_relocate_section): Likewise.
2487 2017-02-14 Alan Modra <amodra@gmail.com>
2489 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2490 --gc-keep-exported, and test versioned field of sym rather than
2491 looking for @ in name.
2493 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2495 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2498 2017-02-13 Nick Clifton <nickc@redhat.com>
2501 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2504 2017-02-07 Andrew Waterman <andrew@sifive.com>
2506 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2507 entry size if PLT header is written.
2509 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2511 Fix sparc64 dynamic relocation processing to use the dynamic
2513 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2514 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2517 2017-02-03 Nick Clifton <nickc@redhat.com>
2520 * coffcode.h (coff_write_object_contents): Enlarge size of
2521 s_name_buf in order to avoid compile time warning about possible
2523 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2524 32-bits of insn value before printing into buffer.
2526 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2528 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2529 `max_local_dynindx'.
2530 (mips_elf_sort_hash_table): Handle it.
2531 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2532 symbols bump up `max_local_dynindx' rather than
2533 `max_non_got_dynindx'.
2535 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2537 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2538 `min_got_dynindx', `max_unref_got_dynindx' and
2539 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2540 (mips_elf_sort_hash_table): Adjust accordingly.
2542 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2544 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2545 to access the hash table.
2547 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2549 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2550 non-NULL `htab' to the beginning.
2552 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2554 * elflink.c (elf_gc_sweep): Wrap overlong line.
2556 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2558 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2559 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2560 * elfxx-mips.c (mips_elf_link_hash_table): Add
2561 `ignore_branch_isa' member.
2562 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2563 in branch relocation calculation as an error if
2564 `ignore_branch_isa' has been set.
2565 (_bfd_mips_elf_insn32): Rename to...
2566 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2567 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2568 Handle the new parameter.
2570 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2572 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2573 local variable dynobj.
2576 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2577 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2578 executable from read-only sections into sdynrelro.
2579 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2580 dynamic relocs in sdynrelro.
2581 (elf_backend_want_dynrelro): Define.
2583 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2585 * config.bfd (*-*-rtemsaout*): Mark as removed.
2587 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2589 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2590 (arm-*-rtems*): Move to (arm*-*-eabi*).
2591 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2592 (m68-*-rtems*): Move to (m68*-*-elf*).
2594 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2596 * config.bfd (*-*-rtemscoff*): Mark as removed.
2598 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2601 * elflink.c (bfd_elf_record_link_assignment): Revert last
2602 change and don't ever clear `forced_local'. Set `mark'
2604 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2606 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2607 (bfd_elf_size_dynamic_sections): ... here.
2608 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2609 and set `mark' instead in `__tls_get_addr_opt' processing.
2610 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2612 2017-01-24 Alan Modra <amodra@gmail.com>
2614 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2615 where dynamic relocs are preferable. Allow ifunc too.
2616 (ensure_undefweak_dynamic): New function.
2617 (allocate_dynrelocs): Use it here. Move plt handling last and
2618 don't make symbols dynamic, simplifying loop. Only make undef
2619 weak symbols with GOT entries dynamic. Correct condition
2620 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2621 comments. Remove goto.
2622 (ppc_elf_relocate_section): Correct test for using dynamic
2623 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2624 to suit. Set up explicit tls_index entries and implicit GOT
2625 tls_index entries resolvable at link time for
2626 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2627 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2628 (ensure_undefweak_dynamic): New function.
2629 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2630 with GOT entries dynamic. Remove unnecessary test of
2631 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2632 (ppc64_elf_relocate_section): Correct test for using dynamic
2633 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2634 to suit. Set up explicit tls_index entries and implicit GOT
2635 tls_index entries resolvable at link time for __tls_get_addr_opt.
2636 Simplify expression to clear mem for prelink.
2638 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2640 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2642 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2644 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2645 (elf_backend_hash_symbol): Define.
2647 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2650 * elflink.c (bfd_elf_record_link_assignment): Clear any
2651 `forced_local' marking for DSO symbols that are not being
2654 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2656 * elfnn-riscv.c (riscv_elf_object_p): New function.
2658 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2661 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2663 (elf_x86_64_check_relocs): Create .eh_frame section for the
2665 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2666 .eh_frame section for the .plt.bnd section.
2667 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2668 for the .plt.bnd section.
2670 2017-01-12 Nick Clifton <nickc@redhat.com>
2673 * opncls.c (find_separate_debug_file): Add include_dirs
2674 parameter. Only include the directory part of the bfd's filename
2675 in search paths if include_dirs is true. Add a couple of extra
2676 locations for looking for debug files.
2677 ( bfd_follow_gnu_debuglink): Update invocation of
2678 find_separate_debug_file.
2679 (bfd_follow_gnu_debugaltlink): Likewise.
2680 (get_build_id): New function: Finds the build-id of the given bfd.
2681 (get_build_id_name): New function: Computes the name of the
2682 separate debug info file for a bfd, based upon its build-id.
2683 (check_build_id_file): New function: Checks to see if a separate
2684 debug info file exists at the given location, and that its
2685 build-id matches that of the original bfd.
2686 (bfd_follow_build_id_debuglink): New function: Finds a separate
2687 debug info file for a given bfd by using the build-id method.
2688 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2689 method of locating a separate debug info file before using the
2691 * bfd-in2.h: Regenerate.
2693 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2696 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2697 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2698 elf_x86_64_eh_frame_plt_got.
2699 (elf_x86_64_size_dynamic_sections): Get unwind info from
2700 elf_x86_64_bnd_arch_bed for the BND PLT.
2702 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2704 * config.bfd: Add entries for i686-redox and x86_64-redox.
2706 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2708 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2710 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2711 .eh_frame section to 4 bytes for x32.
2712 (elf_x86_64_check_relocs): Likewise.
2714 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2717 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2718 (PLT_GOT_FDE_LENGTH): Likewise.
2719 (elf_i386_plt_layout): Add eh_frame_plt_got and
2720 eh_frame_plt_got_size.
2721 (elf_i386_plt): Updated.
2722 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2723 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2724 (elf_i386_size_dynamic_sections): Allocate and initialize
2725 .eh_frame section for .plt.got.
2726 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2728 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2729 eh_frame_plt_got_size.
2730 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2731 (PLT_GOT_FDE_LENGTH): Likewise.
2732 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2733 eh_frame_plt_got_size.
2734 (elf_x86_64_arch_bed): Updated.
2735 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2736 eh_frame_plt_got_size.
2737 (elf_x86_64_nacl_arch_bed): Likewise.
2738 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2739 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2740 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2741 .eh_frame section for .plt.got.
2742 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2745 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2747 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2748 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2750 2017-01-09 Nick Clifton <nickc@redhat.com>
2752 * dwarf2.c (lookup_address_in_function_table): Return early if
2753 there are no functions in the given comp unit, or if the high
2754 address of the last function in the comp unit is less than the
2757 2017-01-09 Nick Clifton <nickc@redhat.com>
2760 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2761 message if there are too many symbols to load.
2763 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2765 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2766 if relocs are cached.
2768 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2771 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2772 for R_MICROBLAZE_GOTOFF_64.
2774 2017-01-03 Nick Clifton <nickc@redhat.com>
2776 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2777 warning about using a possibly uninitialised variable.
2779 2017-01-02 Alan Modra <amodra@gmail.com>
2781 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2782 (allocate_plt_static, allocate_dynrelocs): Use it.
2784 2017-01-02 Alan Modra <amodra@gmail.com>
2786 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2787 .PARISC.unwind section.
2789 2017-01-02 Alan Modra <amodra@gmail.com>
2792 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2793 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2794 indirect to GOT pointer relative code edit.
2796 2017-01-02 Alan Modra <amodra@gmail.com>
2798 Update year range in copyright notice of all files.
2800 For older changes see ChangeLog-2016
2802 Copyright (C) 2017 Free Software Foundation, Inc.
2804 Copying and distribution of this file, with or without modification,
2805 are permitted in any medium without royalty provided the copyright
2806 notice and this notice are preserved.
2812 version-control: never