1 2017-07-31 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
6 2017-07-29 Alan Modra <amodra@gmail.com>
9 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
10 (ppc64_elf_merge_symbol): Set non_zero_localentry.
11 (is_elfv2_localentry0): Test non_zero_localentry.
12 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
14 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
17 pointer check for htab->elf.irelplt.
18 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
20 2017-07-27 Nick Clifton <nickc@redhat.com>
23 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
25 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
27 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
29 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
31 (evax_bfd_print_emh): Check for invalid string lengths.
33 2017-07-25 Nick Clifton <nickc@redhat.com>
35 * po/fr.po: Updated French translation.
37 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
40 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
41 16-bit absolute branches into 10-bit pc-relative branches on the
42 MSP430 as well as the MSP430X.
44 2017-07-25 Alan Modra <amodra@gmail.com>
46 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
47 (stub_eh_frame_size): New function.
48 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
49 (group_sections): Init group tls_get_addr_opt_bctrl.
50 (ppc64_elf_size_stubs): Update sizing and initialization of
51 .eh_frame. Iteration over stubs via group list.
52 (ppc64_elf_build_stubs): Iterate over stubs via group list.
53 (ppc64_elf_finish_dynamic_sections): Update finalization of
56 2017-07-24 Nick Clifton <nickc@redhat.com>
59 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
60 of the relocs to the canonicalize_one_reloc routine.
61 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
62 for the _bfd_mach_o_canonicalize_one_reloc field.
63 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
64 res_base parameter. Use to check for corrupt pair relocs.
65 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
67 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
69 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
72 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
73 enough data in the record before attempting to parse it.
74 (_bfd_vms_slurp_eeom): Likewise.
76 (_bfd_vms_slurp_egsd): Check for an invalid section index.
77 (image_set_ptr): Likewise.
78 (alpha_vms_slurp_relocs): Likewise.
80 (alpha_vms_object_p): Check for a truncated record.
82 2017-07-24 Nick Clifton <nickc@redhat.com>
85 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
86 an unrecognized reloc and sets the bfd_error value.
87 * libbfd.h: Regenerate.
88 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
90 * elf32-i386.c (elf_i386_relocate_section): Likewise.
91 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
92 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
93 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
94 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
96 2017-07-23 Alan Modra <amodra@gmail.com>
98 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
101 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
104 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
105 reloc_class_ifunc for ifunc symbols.
107 2017-07-19 Nick Clifton <nickc@redhat.com>
110 * archive.c (bfd_generic_archive_p): If the bfd does not have the
111 correct magic bytes at the start, set the error to wrong format
112 and clear the format selector before returning NULL.
114 2017-07-19 Nick Clifton <nickc@redhat.com>
117 * coff-rs6000.c (_bfd_strntol): New function.
118 (_bfd_strntoll): New function.
119 (GET_VALUE_IN_FIELD): New macro.
120 (EQ_VALUE_IN_FIELD): new macro.
121 (_bfd_xcoff_slurp_armap): Use new macros.
122 (_bfd_xcoff_archive_p): Likewise.
123 (_bfd_xcoff_read_ar_hdr): Likewise.
124 (_bfd_xcoff_openr_next_archived_file): Likewise.
125 (_bfd_xcoff_stat_arch_elt): Likewise.
126 * coff64-rs6000.c (_bfd_strntol): New function.
127 (_bfd_strntoll): New function.
128 (GET_VALUE_IN_FIELD): New macro.
129 (xcoff64_slurp_armap): Use new macros.
131 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
132 John Eric Martin <John.Martin@emmicro-us.com>
134 * bfd-in2.h: Regenerate.
135 * libbfd.h: Regenerate.
136 * elf32-arc.c (JLI): Define.
137 * reloc.c: Add JLI relocations.
139 2017-07-18 Nick Clifton <nickc@redhat.com>
142 * coff-sh.c: Fix spelling typos.
143 * compress.c: Likewise.
144 * cpu-pdp11.c: Likewise.
145 * ecofflink.c: Likewise.
146 * elf-m10300.c: Likewise.
148 * elf32-arm.c: Likewise.
149 * elf32-m68k.c: Likewise.
150 * elf32-nds32.c: Likewise.
151 * elf32-ppc.c: Likewise.
152 * elf32-sh.c: Likewise.
153 * elf32-v850.c: Likewise.
154 * elf64-ppc.c: Likewise.
155 * elf64-x86-64.c: Likewise.
156 * elflink.c: Likewise.
157 * elfnn-aarch64.c: Likewise.
158 * elfxx-mips.c: Likewise.
161 * vms-alpha.c: Likewise.
162 * xcofflink.c: Likewise.
164 2017-07-18 Nick Clifton <nickc@redhat.com>
167 * coffcode.h (handle_COMDAT): Replace abort with an error message
170 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
173 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
176 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
178 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
180 2017-07-16 Alan Modra <amodra@gmail.com>
182 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
183 __tls_index GOT entries when using __tls_get_addr_opt stub.
184 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
186 2017-07-12 Alan Modra <amodra@gmail.com>
188 * po/es.po: Update from translationproject.org/latest/bfd/.
189 * po/fi.po: Likewise.
190 * po/fr.po: Likewise.
191 * po/id.po: Likewise.
192 * po/ja.po: Likewise.
193 * po/ro.po: Likewise.
194 * po/ru.po: Likewise.
195 * po/sr.po: Likewise.
196 * po/sv.po: Likewise.
197 * po/tr.po: Likewise.
198 * po/uk.po: Likewise.
199 * po/vi.po: Likewise.
200 * po/zh_CN.po: Likewise.
201 * po/hr.po: New file from translationproject.org.
202 * configure.ac (ALL_LINGUAS): Add hr. Sort.
203 * configure: Regenerate.
205 2017-07-12 Nick Clifton <nickc@redhat.com>
207 Fix compile time warnings using gcc 7.1.1.
208 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
210 (elf_xtensa_get_gotplt_section): Increase length of got_name
212 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
213 default return of FALSE.
214 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
215 default return of FALSE.
217 2017-07-12 Alan Modra <amodra@gmail.com>
219 * binary.c (binary_set_section_contents): Don't print filepos in
221 (coff_write_object_contents): Cast size_t for error message.
222 (coff_slurp_line_table): Don't use bfd_vma symndx.
223 (coff_slurp_reloc_table): Remove unneeded cast.
224 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
226 (find_abstract_instance_name): Likewise.
227 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
228 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
229 (elf32_arm_check_relocs): Make r_symndx an int.
230 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
232 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
234 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
236 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
237 * elf32-s390.c (elf_s390_check_relocs): Likewise.
238 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
239 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
240 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
241 * elf64-s390.c (elf_s390_check_relocs): Likewise.
242 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
243 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
244 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
245 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
246 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
247 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
248 and use %lu for error message.
249 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
250 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
253 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
255 (elf32_arm_final_link_relocate): Likewise.
256 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
257 * coffcode.h (styp_to_sec_flags): Likewise.
258 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
259 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
260 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
261 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
262 (elf32_bfin_merge_private_bfd_data): Likewise.
263 * elf32-cris.c (cris_elf_relocate_section): Likewise.
264 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
265 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
266 (i370_elf_relocate_section): Likewise.
267 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
268 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
269 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
270 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
271 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
272 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
273 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
274 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
275 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
276 * ieee.c (ieee_write_id, read_id): Likewise.
277 * mach-o.c (bfd_mach_o_write_contents): Likewise.
278 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
279 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
280 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
281 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
282 * stabs.c (_bfd_link_section_stabs): Likewise.
284 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
286 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
287 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
288 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
289 * coff-sh.c (sh_relax_section): Likewise.
290 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
291 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
292 * coffcode.h (coff_slurp_reloc_table): Likewise.
293 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
294 (_bfd_coff_read_string_table): Likewise.
295 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
296 * compress.c (bfd_get_full_section_contents): Likewise.
297 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
298 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
299 * elf.c (bfd_elf_string_from_elf_section): Likewise.
300 * elf32-arc.c (arc_special_overflow_checks): Likewise.
301 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
302 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
303 (elf32_arm_write_section): Likewise.
304 * elf32-bfin.c (bfin_relocate_section): Likewise.
305 (bfinfdpic_relocate_section): Likewise.
306 * elf32-hppa.c (hppa_build_one_stub): Likewise.
307 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
308 * elf32-i386.c (elf_i386_tls_transition): Likewise.
309 (elf_i386_relocate_section): Likewise.
310 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
311 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
312 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
313 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
314 * elf32-metag.c (elf_metag_relocate_section): Likewise.
315 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
316 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
317 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
318 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
319 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
320 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
321 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
322 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
323 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
324 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
325 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
326 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
327 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
328 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
329 * elf32-sh.c (sh_elf_relax_section): Likewise.
330 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
331 (sh_elf_relocate_section): Likewise.
332 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
333 * elf32-spu.c (spu_elf_relocate_section): Likewise.
334 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
335 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
336 * elf32-v850.c (v850_elf_relax_section): Likewise.
337 * elf32-vax.c (elf_vax_check_relocs): Likewise.
338 (elf_vax_relocate_section): Likewise.
339 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
340 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
341 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
342 (do_fix_for_relocatable_link): Likewise.
343 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
344 (elf64_alpha_relax_with_lituse): Likewise.
345 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
346 (elf_hppa_final_link_relocate): Likewise.
347 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
348 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
349 (elf64_vms_link_add_object_symbols): Likewise.
350 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
351 (mmix_final_link_relocate): Likewise.
352 * elf64-s390.c (invalid_tls_insn): Likewise.
353 (elf_s390_relocate_section): Likewise.
354 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
355 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
356 (elf_x86_64_relocate_section): Likewise.
357 * elfcode.h (elf_slurp_symbol_table): Likewise.
358 * elfcore.h (elf_core_file_p): Likewise.
359 * elflink.c (elf_link_read_relocs_from_section): Likewise.
360 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
361 (elfNN_aarch64_relocate_section): Likewise.
362 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
363 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
364 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
365 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
366 (_bfd_mips_elf_relocate_section): Likewise.
367 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
368 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
369 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
370 * ieee.c (ieee_slurp_external_symbols): Likewise.
371 * ihex.c (ihex_write_object_content): Likewise.
372 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
373 * merge.c (_bfd_merged_section_offset): Likewise.
374 * mmo.c (mmo_write_loc_chunk): Likewise.
375 (mmo_write_object_contents): Likewise.
376 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
377 * stabs.c (_bfd_link_section_stabs): Likewise.
378 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
380 2017-07-11 Alan Modra <amodra@gmail.com>
382 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
384 2017-07-11 Alan Modra <amodra@gmail.com>
386 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
387 instruction" error using _bfd_error_handler, not einfo.
389 2017-07-10 Nick Clifton <nickc@redhat.com>
391 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
392 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
394 2017-07-07 John Baldwin <jhb@FreeBSD.org>
396 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
398 2017-07-07 Alan Modra <amodra@gmail.com>
400 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
402 2017-07-07 Alan Modra <amodra@gmail.com>
404 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
405 as long long. Move code replacing "ll" with "I64", and simplify.
407 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
409 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
412 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
414 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
416 (line_info_add_file_name): Likewise.
417 (decode_line_info): Likewise.
419 2017-07-04 Tristan Gingold <gingold@adacore.com>
421 * version.m4: Bump version to 2.29.51
422 * configure: Regenerate.
424 2017-07-04 Jiong Wang <jiong.wang@arm.com>
426 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
427 sanity check at the head of this function.
429 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
431 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
433 (struct attr_abbrev): Add field implicit_const.
434 (dwarf_debug_sections): Add .debug_line_str.
435 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
436 (dwarf_debug_section_assert): Add static assertion.
437 (read_indirect_line_string): New.
438 (read_abbrevs): Support DW_FORM_implicit_const.
439 (is_str_attr): Support DW_FORM_line_strp.
440 (read_attribute_value): Support DW_FORM_line_strp and
441 DW_FORM_implicit_const.
442 (read_attribute): Support DW_FORM_implicit_const.
443 (line_info_add_include_dir, line_info_add_include_dir_stub):
444 (line_info_add_file_name, read_formatted_entries): New.
445 (decode_line_info, parse_comp_unit): Support DWARF 5.
446 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
448 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
450 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
451 abort statement that was put for symbols that are not dynamic.
453 2017-07-03 Tristan Gingold <gingold@adacore.com>
455 * po/bfd.pot: Regenerate
457 2017-07-03 Alan Modra <amodra@gmail.com>
459 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
460 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
461 * elf.c (setup_group): Use "Lx" to print sh_size.
462 (_bfd_elf_setup_sections): Remove unnecessary cast and print
463 unknown section type in hex.
464 (copy_special_section_fields): Style fix.
465 (bfd_section_from_shdr): Correct format for sh_link. Use a
466 common error message for all the variants of unrecognized
468 (assign_file_positions_for_load_sections): Use "Lx" for lma
469 adjust error message.
470 (assign_file_positions_for_non_load_sections): Formatting.
471 (rewrite_elf_program_header): Formatting. Use "Lx" for
472 bfd_vma values in error messages.
473 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
474 ELF_R_SYM value to type expected by format.
475 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
477 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
478 (elf_link_input_bfd): Use "Lx" for r_info.
479 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
481 2017-07-03 Alan Modra <amodra@gmail.com>
483 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
484 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
485 Microsoft C library variant of long long format specifier.
486 (PRINT20): Cast value to bfd_uint64_t not long long.
487 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
488 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
489 long long. Don't cast to bfd_vma.
490 * elf32-score.c (score3_bfd_getl48): Likewise.
491 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
493 2017-07-03 Alan Modra <amodra@gmail.com>
495 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
497 (bfd_elf_print_symbol): Don't cast symbol->flags.
498 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
499 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
500 _bfd_error_handler argument order.
501 (ppc_elf_merge_private_bfd_data): Don't cast flags.
503 2017-07-03 Alan Modra <amodra@gmail.com>
505 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
507 * configure: Regenerate.
508 * config.in: Regenerate.
510 2017-06-29 Andrew Waterman <andrew@sifive.com>
512 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
515 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
517 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
518 unless it is undefined weak.
519 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
520 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
522 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
523 is not dynamic in PIC, abort.
525 2017-06-29 Jiong Wang <jiong.wang@arm.com>
528 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
529 undefined weak symbols into dynamic.
530 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
531 relocation for non-dynamic symbols.
532 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
534 2017-06-29 Jiong Wang <jiong.wang@arm.com>
536 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
537 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
538 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
539 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
540 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
543 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
545 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
546 (elfcore_write_s390_gs_bc): Likewise.
547 * elf.c (elfcore_grok_s390_gs_cb): New function.
548 (elfcore_grok_s390_gs_bc): New function.
549 (elfcore_grok_note): Call them.
550 (elfcore_write_s390_gs_cb): New function.
551 (elfcore_write_s390_gs_bc): New function.
552 (elfcore_write_register_note): Call them.
554 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
556 * libbfd.c (_bfd_generic_get_section_contents): Don't call
557 bfd_get_file_size. Check archive element size.
558 (_bfd_generic_get_section_contents_in_window): Likewise.
560 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
562 * bfd-in2.h: Regenerated.
563 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
564 (bfd_get_file_size): Likewise.
566 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
567 Matthew Fortune <matthew.fortune@imgtec.com>
569 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
570 * cpu-mips.c (I_interaptiv_mr2): New enum value.
571 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
572 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
574 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
575 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
576 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
577 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
578 `bfd_mach_mips_interaptiv_mr2' entries.
579 * bfd-in2.h: Regenerate.
581 2017-06-27 Nick Clifton <nickc@redhat.com>
583 * tekhex.c (pass_over): Revert accidental conversion of a local
584 array to a static array.
586 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
589 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
590 reloc addend if necessary. Adjust diff only if
591 shrinked_insn_address < end_address.
593 2017-06-27 Alan Modra <amodra@gmail.com>
596 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
597 (_bfd_generic_get_section_contents_in_window): Likewise.
599 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
601 * elfnn-riscv.c (perform_relocation): Support the new
602 R_RISCV_32_PCREL relocation.
603 (riscv_elf_relocate_section): Likewise.
604 * elfxx-riscv.c (howto_table): Likewise.
605 (riscv_reloc_map): Likewise.
606 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
607 * libbfd.h: Regenerate.
609 2017-06-27 Alan Modra <amodra@gmail.com>
612 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
613 Use unsigned file pointer type, and remove cast.
614 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
615 Add "count", not "sz".
617 2017-06-26 Pedro Alves <palves@redhat.com>
620 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
623 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
626 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
629 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
631 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
632 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
633 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
634 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
635 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
637 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
640 * compress.c (bfd_get_full_section_contents): Don't check the
642 * libbfd.c (_bfd_generic_get_section_contents): Check for and
643 reject a section whose size + offset is greater than the size
645 (_bfd_generic_get_section_contents_in_window): Likewise.
647 2017-06-26 Nick Clifton <nickc@redhat.com>
650 * tekhex.c (getvalue): Check for the source pointer exceeding the
651 end pointer before the first byte is read.
653 2017-06-26 Nick Clifton <nickc@redhat.com>
656 * opncls.c (get_build_id): Check that the section is big enough
657 to contain the whole note.
658 * compress.c (bfd_get_full_section_contents): Check for and reject
659 a section whose size is greater than the size of the entire file.
660 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
661 contain a notes section.
663 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
665 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
667 (elf_s390_modify_segment_map): Likewise.
668 (bfd_elf_s390_set_options): Lisewise.
670 2017-06-26 Alan Modra <amodra@gmail.com>
672 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
674 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
675 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
676 .preinit_array on --just-syms bfds.
677 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
678 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
679 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
681 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
683 * elf.c (find_link): Bounds check "hint".
685 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
687 * elf32-arm.c (using_thumb_only): Update list of architectures in
688 BFD_ASSERT for which the logic is valid.
689 (using_thumb2_bl): Likewise.
690 (using_thumb2): Likewise and return true for ARMv8-R.
691 (arch_has_arm_nop): Likewise.
692 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
693 merging logic. Update commentis for value 15 of v8m_baseline,
694 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
695 merging of value 15 of Tag_CPU_arch.
697 2017-06-23 Jiong Wang <jiong.wang@arm.com>
699 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
700 BFD_RELOC_AARCH64_ADR_GOT_PAGE
701 * bfd-in2.h: Regenerate.
703 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
705 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
706 the error_alignment label forward. Properly align program
707 property note section.
709 2017-06-22 Eric Christopher <echristo@gmail.com>
711 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
712 abs to fix a truncation warning.
714 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
716 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
717 local undefined weak symbol to 0.
718 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
720 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
722 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
723 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
724 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
725 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
726 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
727 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
728 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
729 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
731 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
733 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
734 (elf_i386_lazy_ibt_plt_entry): Likewise.
735 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
736 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
737 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
738 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
739 (elf_i386_lazy_plt_layout): Likewise.
740 (elf_i386_non_lazy_plt_layout): Likewise.
741 (elf_i386_link_hash_entry): Add plt_second.
742 (elf_i386_link_hash_table): Add plt_second and
744 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
745 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
746 the second PLT. Check the second PLT.
747 (elf_i386_relocate_section): Use the second PLT to resolve
748 PLT reference if needed.
749 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
751 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
752 second PLT. Generate unwind info for the second PLT.
753 (elf_i386_plt_type): Add plt_second.
754 (elf_i386_get_synthetic_symtab): Support the second PLT.
755 (elf_i386_parse_gnu_properties): Support
756 GNU_PROPERTY_X86_FEATURE_1_AND.
757 (elf_i386_merge_gnu_properties): Support
758 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
759 on GNU_PROPERTY_X86_FEATURE_1_IBT
760 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
761 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
762 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
763 is set on all relocatable inputs.
764 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
765 (elf_x32_lazy_ibt_plt_entry): Likewise.
766 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
767 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
768 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
769 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
770 (elf_x86_64_lazy_ibt_plt): Likewise.
771 (elf_x32_lazy_ibt_plt): Likewise.
772 (elf_x86_64_non_lazy_ibt_plt): Likewise.
773 (elf_x32_non_lazy_ibt_plt): Likewise.
774 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
775 (elf_x86_64_parse_gnu_properties): Support
776 GNU_PROPERTY_X86_FEATURE_1_AND.
777 (elf_x86_64_merge_gnu_properties): Support
778 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
779 on GNU_PROPERTY_X86_FEATURE_1_IBT
780 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
781 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
782 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
783 is set on all relocatable inputs.
785 2017-06-22 Nick Clifton <nickc@redhat.com>
788 * som.c (setup_sections): NUL terminate the space_strings buffer.
789 Check that the space.name field does not index beyond the end of
790 the space_strings buffer.
792 2017-06-21 Nick Clifton <nickc@redhat.com>
795 * coff-sh.c (sh_reloc): Check for an out of range reloc.
797 2017-06-21 Nick Clifton <nickc@redhat.com>
800 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
801 type of the size parameter.
802 (_bfd_vms_save_counted_string): Add second parameter - the maximum
803 length of the counted string.
804 * vms.h (_bfd_vms_save_sized_string): Update prototype.
805 (_bfd_vms_save_counted_string): Likewise.
806 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
807 _bfd_vms_save_counted_string.
808 (_bfd_vms_slurp_ehdr): Likewise.
809 (_bfd_vms_slurp_egsd): Likewise.
810 (Parse_module): Likewise.
812 2017-06-21 Alan Modra <amodra@gmail.com>
814 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
815 calls before tocsave calls.
816 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
819 2017-06-21 Nick Clifton <nickc@redhat.com>
822 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
823 bfd_get_full_section_contents returns no contents.
825 2017-06-21 Nick Clifton <nickc@redhat.com>
828 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
831 2017-06-21 Nick Clifton <nickc@redhat.com>
834 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
836 (image_set_ptr): Likewise.
837 (alpha_vms_fix_sec_rel): Likewise.
838 (alpha_vms_slurp_relocs): Likewise.
840 2017-06-21 Nick Clifton <nickc@redhat.com>
843 * ieee.c (ieee_slurp_sections): Check for a NULL return from
845 (ieee_archive_p): Likewise.
846 (ieee_object_p): Likewise.
848 2017-06-21 Nick Clifton <nickc@redhat.com>
851 * elf.c (setup_group): Zero the group section pointer list after
852 allocation so that loops can be caught. Check for NULL pointers
853 when processing a group list.
855 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
857 * elf-s390.h: New file.
858 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
860 (elf_s390_additional_program_headers): New function.
861 (elf_s390_modify_segment_map): New function.
862 (bfd_elf_s390_set_options): New function.
863 (elf_backend_additional_program_headers)
864 (elf_backend_modify_segment_map): Add macro definitions.
866 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
869 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
870 the DYNAMIC bit instead of bfd_count_sections.
872 2017-06-19 Nick Clifton <nickc@redhat.com>
875 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
877 (evax_bfd_print_eeom): Likewise.
878 (evax_bfd_print_egsd): Check for an overlarge record length.
879 (evax_bfd_print_etir): Likewise.
881 2017-06-19 Nick Clifton <nickc@redhat.com>
884 * libieee.h (struct common_header_type): Add end_p field.
885 * ieee.c (this_byte_and_next): Do not advance input_p beyond
887 (read_id): Check for a length that exceeds the remaining bytes in
889 (ieee_seek): Initialise end_p.
890 (ieee_archive_p): Likewise.
891 (ieee_object_p): Likewise.
893 2017-06-19 Nick Clifton <nickc@redhat.com>
896 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
897 before reading the EIHS structure entries.
899 2017-06-19 Nick Clifton <nickc@redhat.com>
902 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
903 gsd_size. Check that there are enough bytes remaining to read the
904 type and size of the next egsd. Check that the size of the egsd
905 does not exceed the size of the record.
907 2017-06-19 Alan Modra <amodra@gmail.com>
909 * config.bfd: Correct targ_underscore for cris.
911 2017-06-18 Alan Modra <amodra@gmail.com>
913 * config.bfd: Correct targ_underscore for epiphany, ip2k,
914 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
916 2017-06-16 Nick Clifton <nickc@redhat.com>
918 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
919 bucketlist is empty because there are no symbols to add to the
922 2017-06-16 Alan Modra <amodra@gmail.com>
928 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
929 (BFD_JUMP_TABLE_LINK): Likewise.
930 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
931 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
932 (bfd_elf_define_start_stop): New function.
933 * linker.c (bfd_generic_define_start_stop): New function.
934 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
936 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
937 * aout-target.h (MY_bfd_define_start_stop): Define.
938 * aout-tic30.c (MY_bfd_define_start_stop): Define.
939 * binary.c (binary_bfd_define_start_stop): Define.
940 * bout.c (b_out_bfd_define_start_stop): Define.
941 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
942 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
943 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
944 * coffcode.h (coff_bfd_define_start_stop): Define.
945 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
946 * i386msdos.c (msdos_bfd_define_start_stop): Define.
947 * i386os9k.c (os9k_bfd_define_start_stop): Define.
948 * ieee.c (ieee_bfd_define_start_stop): Define.
949 * ihex.c (ihex_bfd_define_start_stop): Define.
950 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
951 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
952 * mmo.c (mmo_bfd_define_start_stop): Define.
953 * nlm-target.h (nlm_bfd_define_start_stop): Define.
954 * oasys.c (oasys_bfd_define_start_stop): Define.
955 * pef.c (bfd_pef_bfd_define_start_stop): Define.
956 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
957 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
958 * som.c (som_bfd_define_start_stop): Define.
959 * srec.c (srec_bfd_define_start_stop): Define.
960 * tekhex.c (tekhex_bfd_define_start_stop): Define.
961 * versados.c (versados_bfd_define_start_stop): Define.
962 * vms-alpha.c (vms_bfd_define_start_stop): Define.
963 (alpha_vms_bfd_define_start_stop): Define.
964 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
965 * bfd-in2.h: Regenerate.
966 * libbfd.h: Regenerate.
968 2017-06-16 Jiong Wang <jiong.wang@arm.com>
970 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
971 SYMBOL_REFERENCES_LOCAL.
973 2017-06-15 Jiong Wang <jiong.wang@arm.com>
976 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
977 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
978 runtime for if there needs copy relocation elimination.
979 (need_copy_relocation_p): New function. Return true for symbol with
980 pc-relative references and if it's against read-only sections.
981 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
982 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
983 that are related with accessing external objects.
984 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
985 in elfNN_aarch64_check_relocs.
987 2017-06-15 Nick Clifton <nickc@redhat.com>
990 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
993 (ieee_archive_p): Likewise.
995 2017-06-15 Nick Clifton <nickc@redhat.com>
998 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1000 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1002 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1003 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1004 keep both windowed and call0 ABI PLT definitions.
1005 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1006 elf_xtensa_*_plt_entry endex.
1007 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1009 2017-06-14 Nick Clifton <nickc@redhat.com>
1012 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1015 2017-06-14 Nick Clifton <nickc@redhat.com>
1018 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1019 maximum value for the ascic pointer. Check that name processing
1020 does not read beyond this value.
1021 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1024 2017-06-14 Nick Clifton <nickc@redhat.com>
1027 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1028 (process_otr): Check for an invalid offset in the otr structure.
1030 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1032 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1034 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1040 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1041 vtable field to a union.
1042 (_bfd_elf_is_start_stop): Removed.
1043 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1044 __start_SECNAME and __stop_SECNAME symbols.
1045 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1046 * elflink.c (_bfd_elf_is_start_stop): Removed.
1047 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1048 _bfd_elf_is_start_stop.
1049 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1050 __stop_SECNAME symbols. Updated.
1051 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1052 (bfd_elf_gc_record_vtinherit): Likewise.
1053 (bfd_elf_gc_record_vtentry): Likewise.
1055 2017-06-13 Nick Clifton <nickc@redhat.com>
1058 * elflink.c (elf_link_adjust_relocs): Generate an error when
1059 encountering a reloc against a symbol removed by garbage
1062 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1064 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1065 to merge_gnu_properties.
1066 * elf-properties.c (elf_merge_gnu_properties): Add struct
1067 bfd_link_info * and pass it to merge_gnu_properties.
1068 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1069 and pass it to elf_merge_gnu_properties.
1070 (_bfd_elf_link_setup_gnu_properties): Pass info to
1071 elf_merge_gnu_property_list.
1072 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1074 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1076 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1079 * binary.c (binary_set_section_contents): Scale lma by octets
1080 per byte to set filepos.
1082 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1084 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1087 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1089 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1092 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1094 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1095 patched section contents for TLS IE reloc.
1096 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1098 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1100 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1101 RELOC_FOR_GLOBAL_SYMBOL macro.
1103 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1105 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1108 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1110 * config/tc-arc.c (md_undefined_symbol): Changed.
1111 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1113 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1115 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1118 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1120 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1121 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1123 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1125 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1128 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1130 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1131 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1132 is non-zero. Add clarifying comments.
1134 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1136 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1137 name. Use local IFUNC symbol name string to report unsupported
1138 non-PIC call to IFUNC function.
1139 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1140 when generating R_386_IRELATIVE relocation.
1141 (elf_i386_finish_dynamic_symbol): Likewise.
1142 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1144 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1145 when generating R_X86_64_IRELATIVE relocation.
1146 (elf_x86_64_finish_dynamic_symbol): Likewise.
1148 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1150 * elf.c (setup_group): Make sure BFD sections are created for all
1151 group sections in the input file when processing SHF_GROUP
1153 (bfd_section_from_shdr): Avoid duplicating logic already
1154 implemented in `setup_group'.
1156 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1159 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1160 if the hint address is zero.
1162 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1165 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1166 ELF_COMMON_DEF_P for common symbols.
1168 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1170 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1171 SEC_GROUP sections as SEC_EXCLUDE.
1172 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1173 (assign_section_numbers): Use resolve_section_groups flag instead
1174 of relocatable link type.
1175 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1176 flag instead of checking the final_link flag for part of the
1177 checks in here. Fix white space as a result.
1178 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1179 instead of relocatable link type.
1180 (bfd_elf_final_link): Likewise.
1182 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1184 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1186 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1187 (s3_bfd_score_elf_check_relocs): Likewise.
1188 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1189 (score_elf_final_link_relocate): Likewise.
1190 (s7_bfd_score_elf_check_relocs): Likewise.
1192 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1194 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1197 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1199 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1200 from `reloc_count' rather than decrementing it.
1201 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1202 `reloc_count' by `int_rels_per_ext_rel'.
1203 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1204 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1205 entry determination.
1206 (s3_bfd_score_elf_check_relocs): Likewise.
1207 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1208 (s7_bfd_score_elf_relocate_section): Likewise.
1209 (s7_bfd_score_elf_check_relocs): Likewise.
1210 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1211 prototype and function.
1212 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1213 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1214 triple rather than once the sum of REL and RELA relocation entry
1216 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1217 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1218 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1219 storage allocation size determination.
1220 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1221 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1222 by `int_rels_per_ext_rel' for last relocation entry
1224 (bfd_elf_final_link): Do not multiply `reloc_count' by
1225 `int_rels_per_ext_rel' for internal relocation storage
1226 allocation size determination.
1227 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1228 `int_rels_per_ext_rel' for last relocation entry determination.
1229 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1230 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1231 (_bfd_mips_elf_relocate_section): Likewise.
1233 2017-06-05 Alan Modra <amodra@gmail.com>
1236 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1238 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1240 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1241 determine structure sizes.
1242 (elfcore_grok_freebsd_prstatus): Likewise.
1244 2017-06-01 Alan Modra <amodra@gmail.com>
1246 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1247 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1249 (is_elfv2_localentry0): New function.
1250 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1251 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1252 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1253 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1254 optimized localentry:0 stubs.
1255 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1256 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1258 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1260 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1262 2017-05-30 Casey Smith <clegg89@gmail.com>
1265 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1266 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1268 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1270 * cpu-arc.c (arc_compatible): New function.
1272 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1274 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1276 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1279 * bfdio.c (bfd_get_file_size): New function.
1280 * bfd-in2.h: Regenerated.
1282 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1284 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1287 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1289 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1290 dynobj instead of htab->elf.dynobj.
1292 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1294 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1296 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1297 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1298 actual number of internal relocations retrieved. Adjust
1299 function description.
1300 (bfd_elf64_canonicalize_reloc): Remove macro.
1301 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1303 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1305 * archures.c (bfd_mach_sparc_v9m8): Define.
1306 (bfd_mach_sparc_v8plusm8): Likewise.
1307 (bfd_mach_sparc_v9_p): Adjust to M8.
1308 (bfd_mach_sparc_64bit_p): Likewise.
1309 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1310 bfd_mach_sparc_v8plusm8.
1311 * bfd-in2.h: Regenerated.
1312 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1314 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1315 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1316 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1318 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1319 bfd_mach_sparc_v8plusm8.
1321 2017-05-19 Alan Modra <amodra@gmail.com>
1323 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1324 debug and special sections when no non-note alloc sections in an
1327 2017-05-18 Alan Modra <amodra@gmail.com>
1329 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1330 * elf-m10300.c: Likewise.
1332 * elf32-arc.c: Likewise.
1333 * elf32-bfin.c: Likewise.
1334 * elf32-m68k.c: Likewise.
1335 * elf32-nds32.c: Likewise.
1336 * elf32-tilepro.c: Likewise.
1337 * elflink.c: Likewise.
1338 * elfnn-aarch64.c: Likewise.
1339 * elfnn-riscv.c: Likewise.
1340 * elfxx-tilegx.c: Likewise.
1341 * mach-o.c: Likewise.
1342 * peXXigen.c: Likewise.
1343 * vms-alpha.c: Likewise.
1344 * vms-lib.c: Likewise.
1346 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1349 * elflink.c (elf_gc_mark_debug_section): New function.
1350 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1351 referenced by kept debug sections.
1353 2017-05-16 Alan Modra <amodra@gmail.com>
1355 * elf-m10300.c: Rename occurrences of non_ir_ref.
1356 * elf32-arm.c: Likewise.
1357 * elf32-bfin.c: Likewise.
1358 * elf32-cr16.c: Likewise.
1359 * elf32-cris.c: Likewise.
1360 * elf32-d10v.c: Likewise.
1361 * elf32-dlx.c: Likewise.
1362 * elf32-fr30.c: Likewise.
1363 * elf32-frv.c: Likewise.
1364 * elf32-hppa.c: Likewise.
1365 * elf32-i370.c: Likewise.
1366 * elf32-i386.c: Likewise.
1367 * elf32-iq2000.c: Likewise.
1368 * elf32-lm32.c: Likewise.
1369 * elf32-m32c.c: Likewise.
1370 * elf32-m32r.c: Likewise.
1371 * elf32-m68hc1x.c: Likewise.
1372 * elf32-m68k.c: Likewise.
1373 * elf32-mcore.c: Likewise.
1374 * elf32-metag.c: Likewise.
1375 * elf32-microblaze.c: Likewise.
1376 * elf32-moxie.c: Likewise.
1377 * elf32-msp430.c: Likewise.
1378 * elf32-mt.c: Likewise.
1379 * elf32-nios2.c: Likewise.
1380 * elf32-or1k.c: Likewise.
1381 * elf32-ppc.c: Likewise.
1382 * elf32-rl78.c: Likewise.
1383 * elf32-s390.c: Likewise.
1384 * elf32-score.c: Likewise.
1385 * elf32-score7.c: Likewise.
1386 * elf32-sh.c: Likewise.
1387 * elf32-tic6x.c: Likewise.
1388 * elf32-tilepro.c: Likewise.
1389 * elf32-v850.c: Likewise.
1390 * elf32-vax.c: Likewise.
1391 * elf32-xstormy16.c: Likewise.
1392 * elf32-xtensa.c: Likewise.
1393 * elf64-alpha.c: Likewise.
1394 * elf64-hppa.c: Likewise.
1395 * elf64-ia64-vms.c: Likewise.
1396 * elf64-mmix.c: Likewise.
1397 * elf64-ppc.c: Likewise.
1398 * elf64-s390.c: Likewise.
1399 * elf64-sh64.c: Likewise.
1400 * elf64-x86-64.c: Likewise.
1401 * elflink.c: Likewise.
1402 * elfnn-aarch64.c: Likewise.
1403 * elfnn-ia64.c: Likewise.
1404 * elfnn-riscv.c: Likewise.
1405 * elfxx-mips.c: Likewise.
1406 * elfxx-sparc.c: Likewise.
1407 * elfxx-tilegx.c: Likewise.
1408 * linker.c: Likewise.
1410 2017-05-16 Alan Modra <amodra@gmail.com>
1412 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1413 * elflink.c (elf_link_add_object_symbols): Update to use
1415 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1417 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1419 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1421 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1423 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1425 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1426 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1428 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1430 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1432 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1434 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1435 to plt_second/plt_second_eh_frame.
1436 (elf_x86_64_link_hash_newfunc): Updated.
1437 (elf_x86_64_allocate_dynrelocs): Likewise.
1438 (elf_x86_64_size_dynamic_sections): Likewise.
1439 (elf_x86_64_relocate_section): Likewise.
1440 (elf_x86_64_finish_dynamic_symbol): Likewise.
1441 (elf_x86_64_finish_dynamic_sections): Likewise.
1442 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1443 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1445 (elf_backend_setup_gnu_properties): Updated. Create the
1446 .plt.sec section instead of the .plt.sec section.
1448 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1450 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1451 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1452 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1454 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1456 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1457 (bfd_elf64_set_reloc): Define.
1458 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1460 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1462 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1463 (struct bfd_target): New field _bfd_set_reloc.
1464 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1465 * reloc.c (_bfd_generic_set_reloc): New function.
1466 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1467 * nlm-target.h (nlm_set_reloc): Likewise.
1468 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1469 * aout-tic30.c (MY_set_reloc): Likewise.
1470 * aout-target.h (MY_set_reloc): Likewise.
1471 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1472 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1473 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1474 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1475 * aout-adobe.c (aout_32_set_reloc): Likewise.
1476 * bout.c (b_out_set_reloc): Likewise.
1477 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1478 * i386os9k.c (aout_32_set_reloc): Likewise.
1479 * ieee.c (ieee_set_reloc): Likewise.
1480 * oasys.c (oasys_set_reloc): Likewise.
1481 * som.c (som_set_reloc): Likewise.
1482 * versados.c (versados_set_reloc): Likewise.
1483 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1484 _bfd_generic_set_reloc.
1485 (rs6000_xcoff64_aix_vec): LIkewise.
1486 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1487 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1488 * i386msdos.c (msdos_set_reloc): Define to
1489 _bfd_norelocs_set_reloc.
1490 * elfcode.h (elf_set_reloc): Define.
1491 * bfd-in2.h: Regenerated.
1493 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1496 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1497 for IFUNC function address.
1499 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1501 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1502 (CONFLICT_LIST): Likewise.
1503 (opcode/arc-attrs.h): Include.
1504 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1505 (arc_extract_features): New file.
1506 (arc_stralloc): Likewise.
1507 (arc_elf_merge_attributes): Likewise.
1508 (arc_elf_merge_private_bfd_data): Use object attributes.
1509 (bfd_arc_get_mach_from_attributes): New function.
1510 (arc_elf_object_p): Use object attributes.
1511 (arc_elf_final_write_processing): Likewise.
1512 (elf32_arc_obj_attrs_arg_type): New function.
1513 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1514 (elf32_arc_section_from_shdr): Likewise.
1515 (elf_backend_obj_attrs_vendor): Define.
1516 (elf_backend_obj_attrs_section): Likewise.
1517 (elf_backend_obj_attrs_arg_type): Likewise.
1518 (elf_backend_obj_attrs_section_type): Likewise.
1519 (elf_backend_obj_attrs_handle_unknown): Likewise.
1520 (elf_backend_section_from_shdr): Likewise.
1522 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1525 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1526 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1527 and the destination is a Thumb symbol.
1529 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1531 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1532 initializer to silence GCC 4.2.
1533 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1535 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1537 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1538 (LAZY_PLT_ENTRY_SIZE): This.
1539 (NON_LAZY_PLT_ENTRY_SIZE): New.
1540 (elf_x86_64_plt0_entry): Renamed to ...
1541 (elf_x86_64_lazy_plt0_entry): This.
1542 (elf_x86_64_plt_entry): Renamed to ...
1543 (elf_x86_64_lazy_plt_entry): This.
1544 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1545 (elf_x86_64_lazy_bnd_plt0_entry): This.
1546 (elf_x86_64_legacy_plt_entry): Removed.
1547 (elf_x86_64_bnd_plt_entry): Renamed to ...
1548 (elf_x86_64_lazy_bnd_plt_entry): This.
1549 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1550 (elf_x86_64_non_lazy_plt_entry): This.
1551 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1552 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1553 (elf_x86_64_eh_frame_plt): Renamed to ...
1554 (elf_x86_64_eh_frame_lazy_plt): This.
1555 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1556 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1557 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1558 (elf_x86_64_eh_frame_non_lazy_plt): This.
1559 (elf_x86_64_lazy_plt_layout): New.
1560 (elf_x86_64_non_lazy_plt_layout): Likewise.
1561 (elf_x86_64_plt_layout): Likewise.
1562 (elf_x86_64_backend_data): Remove PLT layout information. Add
1563 os for target system.
1564 (GET_PLT_ENTRY_SIZE): Removed.
1565 (elf_x86_64_lazy_plt): New.
1566 (elf_x86_64_non_lazy_plt): Likewise.
1567 (elf_x86_64_lazy_bnd_plt): Likewise.
1568 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1569 (elf_x86-64_arch_bed): Updated.
1570 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1571 (elf_x86_64_create_dynamic_sections): Removed.
1572 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1573 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1574 (elf_x86-64_adjust_dynamic_symbol): Updated.
1575 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1576 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1577 size for PLT0 if there is no PLT0. Get plt_entry_size from
1578 non_lazy_plt for non-lazy PLT entries.
1579 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1580 from non_lazy_plt for non-lazy PLT entries.
1581 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1582 if there is no PLT0.
1583 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1584 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1585 entries with non-lazy PLT layout. Don't fill the second and third
1586 slots in the PLT entry if there is no PLT0.
1587 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1588 if there is no PLT0. Set sh_entsize on the .plt.got section.
1589 (compare_relocs): New.
1590 (elf_x86_64_plt_type): Likewise.
1591 (elf_x86_64_plt): Likewise.
1592 (elf_x86_64_nacl_plt): New. Forward declaration.
1593 (elf_x86_64_get_plt_sym_val): Removed.
1594 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1595 against all dynamic relocations.
1596 (elf_x86_64_link_setup_gnu_properties): New function.
1597 (elf_backend_create_dynamic_sections): Updated.
1598 (elf_backend_setup_gnu_properties): New.
1599 (elf_x86_64_nacl_plt): New.
1600 (elf_x86_64_nacl_arch_bed): Updated.
1602 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1604 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1605 (LAZY_PLT_ENTRY_SIZE): This.
1606 (NON_LAZY_PLT_ENTRY_SIZE): New.
1607 (elf_i386_plt0_entry): Renamed to ...
1608 (elf_i386_lazy_plt0_entry): This.
1609 (elf_i386_plt_entry): Renamed to ...
1610 (elf_i386_lazy_plt_entry): This.
1611 (elf_i386_pic_plt0_entry): Renamed to ...
1612 (elf_i386_pic_lazy_plt0_entry): This.
1613 (elf_i386_pic_plt_entry): Renamed to ...
1614 (elf_i386_pic_lazy_plt_entry): This.
1615 (elf_i386_got_plt_entry): Renamed to ...
1616 (elf_i386_non_lazy_plt_entry): This.
1617 (elf_i386_pic_got_plt_entry): Renamed to ...
1618 (elf_i386_pic_non_lazy_plt_entry): This.
1619 (elf_i386_eh_frame_plt): Renamed to ...
1620 (elf_i386_eh_frame_lazy_plt): This.
1621 (elf_i386_eh_frame_plt_got): Renamed to ...
1622 (elf_i386_eh_frame_non_lazy_plt): This.
1623 (elf_i386_plt_layout): Renamed to ...
1624 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1625 eh_frame_plt_got_size.
1626 (elf_i386_non_lazy_plt_layout): New.
1627 (elf_i386_plt_layout): Likewise.
1628 (elf_i386_non_lazy_plt): Likewise.
1629 (GET_PLT_ENTRY_SIZE): Removed.
1630 (elf_i386_plt): Renamed to ...
1631 (elf_i386_lazy_plt): This.
1632 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1633 (elf_i386_arch_bed): Updated.
1634 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1635 (elf_i386_create_dynamic_sections): Removed.
1636 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1637 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1638 (elf_i386_adjust_dynamic_symbol): Updated.
1639 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1640 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1641 size for PLT0 if there is no PLT0.
1642 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1643 output section is discarded only if GOT isn't empty.
1644 (elf_i386_relocate_section): Updated. Properly get PLT index
1645 if there is no PLT0.
1646 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1647 second and third slots in the PLT entry if there is no PLT0.
1648 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1649 if there is no PLT0. Set sh_entsize on the .plt.got section.
1650 (elf_i386_nacl_plt): Forward declaration.
1651 (elf_i386_get_plt_sym_val): Removed.
1652 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1653 against all dynamic relocations.
1654 (elf_i386_link_setup_gnu_properties): New function.
1655 (elf_backend_create_dynamic_sections): Updated.
1656 (elf_backend_setup_gnu_properties): New.
1657 (elf_i386_nacl_plt): Updated.
1658 (elf_i386_nacl_arch_bed): Likewise.
1659 (elf_i386_vxworks_arch_bed): Likewise.
1661 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1663 * elflink.c (elf_output_implib): Remove executable flag from import
1665 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1666 library is a relocatable object file.
1668 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1671 * elf32-avr.c (avr_should_move_sym): New function.
1672 (avr_should_reduce_sym_size): Likewise.
1673 (avr_should_increase_sym_size): Likewise.
1674 (elf32_avr_relax_delete_bytes): Adjust symbol values
1675 and sizes by calling new functions.
1677 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1679 * config.bfd (riscv32-*): Enable rv64.
1681 2017-05-02 Alan Modra <amodra@gmail.com>
1684 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1685 rather than h->root.type == bfd_link_hash_new.
1686 (bfd_elf_record_link_assignment): Similarly, call
1687 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1689 2017-04-29 Alan Modra <amodra@gmail.com>
1692 * reloc.c (reloc_offset_in_range): New function.
1693 (bfd_perform_relocation, bfd_install_relocation): Use it.
1694 (_bfd_final_link_relocate): Likewise.
1696 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1698 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1699 before using .plt.got.
1700 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1702 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1704 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1705 instead of "+=" to update 0.
1707 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1709 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1710 .plt.got section here.
1711 (elf_i386_check_relocs): Don't create the .plt.got section.
1712 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1713 the .plt.got and .plt.bnd sections here.
1714 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1717 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1719 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1721 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1722 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1723 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1724 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1727 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1729 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1731 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1732 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1733 the first relocatable ELF input with GNU properties.
1735 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1737 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1738 VxWorks for non-PIC.
1740 2017-04-27 Alan Modra <amodra@gmail.com>
1742 * elf-bfd.h (struct elf_backend_data): Make asection param of
1743 elf_backend_eh_frame_address_size const.
1744 (_bfd_elf_eh_frame_address_size): Likewise.
1745 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1746 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1747 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1748 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1749 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1750 (next_cie_fde_offset): Constify params.
1751 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1753 2017-04-27 Alan Modra <amodra@gmail.com>
1755 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1756 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1757 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1759 (offset_adjust): New function.
1760 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1761 (adjust_eh_frame_local_symbols): Likewise.
1762 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1763 after changing anything. Return true if anything changed.
1764 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1765 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1767 2017-04-27 Alan Modra <amodra@gmail.com>
1769 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1772 2017-04-27 Alan Modra <amodra@gmail.com>
1774 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1775 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1776 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1777 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1778 for undef and undefweak dyn_relocs.
1779 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1780 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1781 (allocate_got, allocate_dynrelocs): Likewise.
1782 (ppc64_elf_relocate_section): Likewise.
1784 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1786 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1787 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1788 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1789 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1791 2017-04-26 Nick Clifton <nickc@redhat.com>
1794 * reloc.c (bfd_perform_relocation): Check for a negative address
1797 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1800 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1802 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1803 (elf_backend_always_renumber_dynsyms): Define.
1804 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1805 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1806 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1807 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1809 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1811 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1813 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1814 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1815 sections have been created.
1817 2017-04-26 Nick Clifton <nickc@redhat.com>
1820 * compress.c (bfd_init_section_compress_status): Check the return
1821 value from bfd_malloc.
1823 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1825 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1826 no_finish_dynamic_symbol.
1827 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1829 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1830 weak symbol, don't make it dynamic.
1831 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1832 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1833 relocation for GOT reference.
1834 (elf_x86_64_finish_dynamic_symbol): Abort if
1835 no_finish_dynamic_symbol isn't 0.
1837 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1840 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1841 undefined weak symbol, don't make it dynamic.
1842 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1843 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1844 relocation for R_386_GOT32.
1846 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1849 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1851 2017-04-23 Alan Modra <amodra@gmail.com>
1854 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1855 * elf.c (lcomm_sym): New.
1856 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1857 * bfd-in2.h: Regenerate.
1859 2017-04-23 Alan Modra <amodra@gmail.com>
1862 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1863 parameters and comment.
1864 (_bfd_elf_get_reloc_section): Delete.
1865 (_bfd_elf_plt_get_reloc_section): Declare.
1866 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1867 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1869 (_bfd_elf_get_reloc_section): ..here. Delete.
1870 (assign_section_numbers): Call elf_get_reloc_section.
1871 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1872 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1874 2017-04-23 Alan Modra <amodra@gmail.com>
1877 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1880 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1883 * elf32-i386.c (elf_i386_link_hash_entry): Add
1884 no_finish_dynamic_symbol.
1885 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1886 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1887 symbol, don't make it dynamic in PIE.
1888 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1889 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1890 relocation for R_386_GOT32
1891 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1894 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1898 * elflink.c (elf_link_add_object_symbols): Require
1899 --no-dynamic-linker with -E/--dynamic-list when creating
1902 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1904 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1907 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1909 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1910 dynamic symbol sorting.
1912 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1915 * elflink.c (elf_link_add_object_symbols): Preserve
1916 dynamic_ref_after_ir_def when restoring the symbol table for
1917 unneeded dynamic object.
1919 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1922 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1923 on on undefined IFUNC symbol in the second PLT.
1925 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1927 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1929 2017-04-19 Alan Modra <amodra@gmail.com>
1931 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1932 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1933 * elf32-ppc.c:Formatting.
1934 (ensure_undefweak_dynamic): Don't make dynamic when
1935 info->dynamic_undefined_weak is zero.
1936 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1937 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1938 not default visibility. Discard undef and undefweak
1940 (ppc_elf_relocate_section): Adjust to suit.
1941 * elf64-ppc.c: Formatting.
1942 (ensure_undefweak_dynamic): Don't make dynamic when
1943 info->dynamic_undefined_weak is zero.
1944 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1945 info->dynamic_undefined_weak. Discard them earlier.
1947 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1950 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1951 before generating the version definition section.
1953 2017-04-17 Alan Modra <amodra@gmail.com>
1955 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1956 state when a regular object file defines a symbol with
1957 incompatible type to that defined by an earlier shared lib.
1959 2017-04-13 Alan Modra <amodra@gmail.com>
1961 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1963 * elf32-arm.c: Likewise.
1964 * elf32-i386.c: Likewise.
1965 * elf32-mep.c: Likewise.
1966 * elf64-ia64-vms.c: Likewise.
1967 * elf64-x86-64.c: Likewise.
1968 * elflink.c: Likewise.
1969 * elfnn-ia64.c: Likewise.
1970 * elfxx-mips.c: Likewise.
1972 2017-04-13 Alan Modra <amodra@gmail.com>
1974 * aoutx.h: Use %B and %A in error messages throughout file.
1975 * aout-cris.c: Likewise.
1976 * archive.c: Likewise.
1977 * binary.c: Likewise.
1978 * coff-rs6000.c: Likewise.
1979 * coff-tic4x.c: Likewise.
1980 * coffcode.h: Likewise.
1981 * coffgen.c: Likewise.
1982 * cofflink.c: Likewise.
1983 * coffswap.h: Likewise.
1984 * cpu-arm.c: Likewise.
1985 * elf-eh-frame.c: Likewise.
1986 * elf-m10300.c: Likewise.
1988 * elf32-arc.c: Likewise.
1989 * elf32-arm.c: Likewise.
1990 * elf32-bfin.c: Likewise.
1991 * elf32-frv.c: Likewise.
1992 * elf32-iq2000.c: Likewise.
1993 * elf32-m32c.c: Likewise.
1994 * elf32-microblaze.c: Likewise.
1995 * elf32-nds32.c: Likewise.
1996 * elf32-rl78.c: Likewise.
1997 * elf32-rx.c: Likewise.
1998 * elf32-score.c: Likewise.
1999 * elf32-score7.c: Likewise.
2000 * elf32-sh64.c: Likewise.
2001 * elf32-v850.c: Likewise.
2002 * elf32-vax.c: Likewise.
2003 * elf32-visium.c: Likewise.
2004 * elf64-ia64-vms.c: Likewise.
2005 * elf64-mmix.c: Likewise.
2006 * elf64-sh64.c: Likewise.
2007 * elfcode.h: Likewise.
2008 * elfnn-aarch64.c: Likewise.
2009 * elfnn-ia64.c: Likewise.
2010 * elfxx-mips.c: Likewise.
2011 * hpux-core.c: Likewise.
2014 * linker.c: Likewise.
2015 * merge.c: Likewise.
2017 * oasys.c: Likewise.
2018 * pdp11.c: Likewise.
2019 * peXXigen.c: Likewise.
2020 * rs6000-core.c: Likewise.
2021 * vms-alpha.c: Likewise.
2022 * xcofflink.c: Likewise.
2024 2017-04-13 Alan Modra <amodra@gmail.com>
2026 * bfd.c (PRINT_TYPE): Define.
2027 (_doprnt): New function.
2028 (error_handler_internal): Use _doprnt.
2029 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2030 calls in their natural order, throughout file.
2031 * coff-mcore.c: Likewise.
2032 * coff-ppc.c: Likewise.
2033 * coff-tic80.c: Likewise.
2034 * cofflink.c: Likewise.
2035 * elf-s390-common.c: Likewise.
2037 * elf32-arm.c: Likewise.
2038 * elf32-i386.c: Likewise.
2039 * elf32-m32r.c: Likewise.
2040 * elf32-msp430.c: Likewise.
2041 * elf32-spu.c: Likewise.
2042 * elf64-ia64-vms.c: Likewise.
2043 * elf64-sparc.c: Likewise.
2044 * elf64-x86-64.c: Likewise.
2045 * elflink.c: Likewise.
2046 * elfnn-aarch64.c: Likewise.
2047 * elfnn-ia64.c: Likewise.
2048 * elfxx-mips.c: Likewise.
2050 2017-04-13 Alan Modra <amodra@gmail.com>
2052 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2053 branch veneers" error. Fix double space and format message.
2054 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2055 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2057 2017-04-13 Alan Modra <amodra@gmail.com>
2059 * bfd-in2.h: Regenerate.
2061 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2063 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2064 extra `\n' in warning/error messages.
2065 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2066 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2068 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2070 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2071 processor-specific properties with generic ELF target vector.
2073 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2075 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2076 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2077 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2078 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2080 (link_hash_newfunc): Initialize has_got_reloc and
2082 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2084 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2086 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2088 (_bfd_sparc_elf_fixup_symbol): New function.
2089 (allocate_dynrelocs): Don't allocate space for dynamic
2090 relocations and discard relocations against resolved undefined
2091 weak symbols in executable. Don't make resolved undefined weak
2092 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2093 relocation against undefined weak symbols in PIE.
2094 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2095 relocations against resolved undefined weak symbols in PIE
2096 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2097 without ynamic PLT/GOT relocations for resolved undefined weak
2099 Don't generate dynamic relocation against resolved undefined
2100 weak symbol in executable.
2101 (pie_finish_undefweak_symbol): New function.
2102 (_bfd_sparc_elf_finish_dynamic_sections): Call
2103 pie_finish_undefweak_symbol on all symbols in PIE.
2104 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2105 (_bfd_sparc_elf_fixup_symbol): New function.
2107 2017-04-10 Nick Clifton <nickc@redhat.com>
2109 * config.bfd: Remove ns32k from obsolete list.
2111 2017-04-10 Alan Modra <amodra@gmail.com>
2114 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2115 (special_sections_i): Likewise for .init_array.
2116 (special_sections_p): Likewise for .preinit_array.
2118 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2122 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2123 ELF_COMMON_DEF_P for common symbols.
2124 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2125 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2126 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2127 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2128 07492f668d2173da7a2bda3707ff0985e0f460b6.
2130 2017-04-07 Pedro Alves <palves@redhat.com>
2132 * opncls.c (bfd_get_debug_link_info): Rename to...
2133 (bfd_get_debug_link_info_1): ... this. Change type of second
2134 parameter to void pointer. Adjust.
2135 (bfd_get_debug_link_info): Reimplement on top of
2136 bfd_get_debug_link_info_1.
2137 (separate_debug_file_exists, separate_alt_debug_file_exists):
2138 Change type of second parameter to void pointer. Adjust.
2139 (get_func_type, check_func_type): Change type of second parameter
2141 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2142 the callback functions instead of passing the address of a local.
2143 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2144 find_separate_debug_file.
2145 (get_alt_debug_link_info_shim): Change type of second parameter to
2146 void pointer. Adjust.
2147 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2148 find_separate_debug_file.
2149 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2150 of second parameter to void pointer. Adjust.
2151 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2152 pointer local to find_separate_debug_file.
2154 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2156 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2157 external symbols with a definition.
2158 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2160 2017-04-07 Alan Modra <amodra@gmail.com>
2162 * po/SRC-POTFILES.in: Regenerate.
2164 2017-04-05 Alan Modra <amodra@gmail.com>
2166 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2169 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2171 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2172 numbers for DataDirectory entry indicies passed to
2175 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2177 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2178 each GNU_MBIND section and align GNU_MBIND section to page size.
2179 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2180 segment for each GNU_MBIND section.
2181 (_bfd_elf_init_private_section_data): Copy sh_info from input
2182 for GNU_MBIND section.
2184 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2186 * elfnn-riscv.c (GP_NAME): Delete.
2187 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2188 (_bfd_riscv_relax_lui): Likewise.
2190 2017-04-04 Nick Clifton <nickc@redhat.com>
2193 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2195 (bfd_elf_final_link): Only initialize the extended symbol index
2196 section if there are extended symbol tables to list.
2198 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2200 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2201 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2202 * configure.ac (elf): Add elf-properties.lo.
2203 * Makefile.in: Regenerated.
2204 * configure: Likewise.
2205 * elf-bfd.h (elf_property_kind): New.
2206 (elf_property): Likewise.
2207 (elf_property_list): Likewise.
2208 (elf_properties): Likewise.
2209 (_bfd_elf_parse_gnu_properties): Likewise.
2210 (_bfd_elf_get_property): Likewise.
2211 (_bfd_elf_link_setup_gnu_properties): Likewise.
2212 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2213 and setup_gnu_properties.
2214 (elf_obj_tdata): Add properties.
2215 * elf-properties.c: New file.
2216 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2217 (elf_i386_merge_gnu_properties): Likewise.
2218 (elf_backend_parse_gnu_properties): Likewise.
2219 (elf_backend_merge_gnu_properties): Likewise.
2220 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2221 (elf_x86_64_merge_gnu_properties): Likewise.
2222 (elf_backend_parse_gnu_properties): Likewise.
2223 (elf_backend_merge_gnu_properties): Likewise.
2224 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2225 (elf_backend_parse_gnu_properties): Likewise.
2226 (elf_backend_setup_gnu_properties): Likewise.
2227 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2228 elf_backend_merge_gnu_properties and
2229 elf_backend_setup_gnu_properties.
2231 2017-03-30 Pip Cet <pipcet@gmail.com>
2233 * elf32-wasm32.c: Add relocation code, two relocs.
2234 * reloc.c: Add wasm32 relocations.
2235 * libbfd.h: Regenerate.
2236 * bfd-in2.h: Regenerate.
2237 * bfd/po/bfd.pot: Regenerate.
2239 2017-03-29 Nick Clifton <nickc@redhat.com>
2242 * coff-bfd.h (struct coff_section_data): Add new fields:
2243 saved_bias and bias.
2244 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2245 computed for PE binaries.
2246 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2249 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2252 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2253 to handle a local symbol with a hash-symbol-entry; without PLT.
2254 Add BFD_ASSERT for an incidental case with GOT entry present.
2255 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2256 isn't forced-or-set local.
2258 2017-03-27 Pip Cet <pipcet@gmail.com>
2260 * wasm-module.c: New file to support WebAssembly modules.
2261 * wasm-module.h: New file to support WebAssembly modules.
2262 * doc/webassembly.texi: Start documenting wasm-module.c.
2263 * config.bfd: Add wasm_vec.
2264 * targets.c: Likewise.
2265 * configure.ac: Likewise.
2266 * Makefile.am: Add entries for wasm-module.c.
2267 * Makefile.in: Regenerate.
2268 * configure: Regenerate.
2269 * po/SRC-POTFILES.in: Regenerate.
2271 2017-03-27 Pip Cet <pipcet@gmail.com>
2273 * cpu-wasm32.c: New file to support wasm32 architecture.
2274 * elf32-wasm32.c: New file to support wasm32 architecture.
2275 * Makefile.am: Add wasm32 architecture.
2276 * archures.c: Likewise.
2277 * config.bfd: Likewise.
2278 * configure.ac: Likewise.
2279 * targets.c: Likewise.
2280 * Makefile.in: Regenerate.
2281 * bfd-in2.h: Regenerate.
2282 * configure: Regenerate.
2283 * po/SRC-POTFILES.in: Regenerate.
2285 2017-03-20 Alan Modra <amodra@gmail.com>
2288 * elf64-ppc.c (compare_symbols): Stabilize sort.
2290 2017-03-18 Alan Modra <amodra@gmail.com>
2292 * elf64-ppc.c (struct ppc_link_hash_table): Add
2293 local_ifunc_resolver and maybe_local_ifunc_resolver.
2294 (ppc_build_one_stub): Set flags on emitting dynamic
2295 relocation to ifunc.
2296 (ppc64_elf_relocate_section): Likewise.
2297 (ppc64_elf_finish_dynamic_symbol): Likewise.
2298 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2299 local dynamic relocs to ifuncs.
2300 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2301 local_ifunc_resolver and maybe_local_ifunc_resolver.
2302 (ppc_elf_relocate_section): Set flag on emitting dynamic
2303 relocation to ifuncs.
2304 (ppc_elf_finish_dynamic_symbol): Likewise.
2305 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2306 dynamic relocs to ifuncs.
2308 2017-03-13 Nick Clifton <nickc@redhat.com>
2311 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2312 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2313 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2314 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2315 * bfd-in2.h: Regenerate.
2316 * libbfd.h: Regenerate.
2317 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2319 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2320 (elfNN_aarch64_howto_table): Likewise.
2321 (aarch64_tls_transition_without_check): Likewise.
2322 (aarch64_reloc_got_type): Likewise.
2323 (elfNN_aarch64_final_link_relocate): Likewise.
2324 (elfNN_aarch64_tls_relax): Likewise.
2325 (elfNN_aarch64_relocate_section): Likewise.
2326 (elfNN_aarch64_gc_sweep_hook): Likewise.
2327 (elfNN_aarch64_check_relocs): Likewise.
2328 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2329 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2331 2017-03-11 Alan Modra <amodra@gmail.com>
2333 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2334 parameter is in fact used. Whitespace fixes.
2335 * elf64-ppc.c: Likewise.
2337 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2339 * rs6000-core.c (CORE_NEW): Simplify macro when
2340 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2342 2017-03-07 Alan Modra <amodra@gmail.com>
2346 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2349 2017-03-05 Alan Modra <amodra@gmail.com>
2351 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2352 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2353 (next_cie_fde_offset): New function.
2354 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2355 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2356 four bytes. Align CIEs to four or eight bytes depending on
2357 per_encoding_aligned8. Align FDEs according to their encoding.
2358 Pad last FDE to output section alignment.
2359 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2361 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2362 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2363 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2365 2017-03-02 Martin Bickel <binutils@ineranves.de>
2368 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2369 empty segments which have a zero filesz, but a non-zero memsz.
2371 2017-03-02 Alan Modra <amodra@gmail.com>
2373 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2375 2017-02-28 Alan Modra <amodra@gmail.com>
2377 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2378 (ppc64_elf_relocate_section): Likewise.
2380 2017-02-28 Alan Modra <amodra@gmail.com>
2383 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2384 rather than elf32_nios2_hash_table or elf_hash_table.
2385 (create_got_section): Likewise.
2386 (nios2_elf32_finish_dynamic_symbol): Likewise.
2387 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2388 (nios2_elf32_size_dynamic_sections): Likewise.
2389 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2390 vars. Use htab equivalents directly instead. Don't create
2391 all dynamic sections on needing just the GOT. Use a goto
2392 rather than a fall-through with reloc test. Ensure
2393 htab->dynobj is set when making dynamic sreloc section.
2394 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2395 equivalent directly instead. Don't segfault on looking for
2396 .dynamic when dynamic sections have not been created. Don't
2397 segfault on .got.plt being discarded.
2398 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2399 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2400 fixme and another not so relevant comment.
2401 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2402 already set, set hash table dynobj on creating .sbss.
2404 2017-02-28 Alan Modra <amodra@gmail.com>
2406 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2407 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2408 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2409 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2410 (ppc64_elf_relocate_section): Likewise.
2411 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2412 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2413 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2414 * libbfd.h: Regenerate.
2415 * bfd-in2.h: Regenerate.
2417 2017-02-28 Alan Modra <amodra@gmail.com>
2419 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2420 dynamic .data.rel.ro read-only.
2421 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2422 rather than section flags when deciding where copy reloc goes.
2423 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2424 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2425 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2426 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2427 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2428 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2429 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2430 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2431 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2432 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2433 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2434 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2435 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2436 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2437 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2438 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2439 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2440 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2441 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2443 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2445 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2446 `jalr $0, $25' instruction encoding.
2448 2017-02-27 Nick Clifton <nickc@redhat.com>
2451 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2452 generating a seg-fault when encountering a symbol that has been
2453 deleted by garbage collection.
2455 2017-02-25 Alan Modra <amodra@gmail.com>
2457 * elf32-arc.c (struct dynamic_sections): Delete.
2458 (enum dyn_section_types): Delete.
2459 (dyn_section_names): Delete.
2460 (arc_create_dynamic_sections): Delete.
2461 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2462 segfault on discarded .rela.plt section.
2463 (elf_arc_size_dynamic_sections): Formatting. Don't call
2464 arc_create_dynamic_sections. Don't allocate memory for sections
2465 handled by the generic linker. Correct code finding relocs in
2466 read-only sections. Set SEC_EXCLUDE on zero size .got,
2467 .got.plt, and .dynbss sections. Do set .interp for pies.
2469 2017-02-24 Andrew Waterman <andrew@sifive.com>
2471 * elfnn-riscv.c (GP_NAME): New macro.
2472 (riscv_global_pointer_value): Use it.
2473 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2474 output section, consider only that section's alignment.
2476 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2478 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2479 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2480 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2481 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2483 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2485 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2486 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2489 2017-02-23 Alan Modra <amodra@gmail.com>
2492 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2494 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2495 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2498 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2501 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2502 processing ahead of the call to `elf_gc_sweep_symbol'.
2504 2017-02-22 Nick Clifton <nickc@redhat.com>
2507 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2508 created section 4-byte alignment.
2510 2017-02-22 Alan Modra <amodra@gmail.com>
2512 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2513 on .got or .plt output section being discarded by script.
2514 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2517 2017-02-21 Alan Modra <amodra@gmail.com>
2519 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2520 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2522 2017-02-20 Alan Modra <amodra@gmail.com>
2525 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2526 if DT_RELSZ/DT_RELASZ is zero.
2528 2017-02-17 Nick Clifton <nickc@redhat.com>
2530 * compress.c (bfd_get_full_section_contents): Remember to reduce
2531 compressed size by the sizeof the compression header when
2532 decompressing the contents.
2534 2017-02-17 Pedro Alves <palves@redhat.com>
2536 * srec.c (Chunk): Rename to ...
2537 (_bfd_srec_len): ... this.
2538 (S3Forced): Rename to ...
2539 (_bfd_srec_forceS3): ... this.
2540 * objcopy.c: Adjust all references.
2542 2017-02-17 Pedro Alves <palves@redhat.com>
2544 * archive.c (bsd_write_armap): Rename to ...
2545 (_bfd_bsd_write_armap): ... this.
2546 (coff_write_armap): Rename to ...
2547 (_bfd_coff_write_armap): ... this.
2548 * libbfd-in.h (bsd_write_armap): Rename to ...
2549 (_bfd_bsd_write_armap): ... this.
2550 (coff_write_armap): Rename to ...
2551 (_bfd_coff_write_armap): ... this.
2552 * aout-target.h, aout-tic30.c: Adjust all users.
2553 * libbfd.h: Regenerate.
2555 2017-02-17 Pedro Alves <palves@redhat.com>
2557 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2558 (warn_deprecated): Rename to ...
2559 (_bfd_warn_deprecated): ... this.
2560 * libbfd.c (warn_deprecated): Rename to ...
2561 (_bfd_warn_deprecated): ... this.
2562 * bfd-in2.h: Regenerate.
2564 2017-02-17 Pedro Alves <palves@redhat.com>
2566 * bfdio.c (real_ftell): Rename to ...
2567 (_bfd_real_ftell): ... this.
2568 (real_fseek): Rename to ...
2569 (_bfd_real_fseek): ... this.
2570 (real_fopen): Rename to ...
2571 (_bfd_real_fopen): ... this.
2572 * libbfd-in.h (real_ftell): Rename to ...
2573 (_bfd_real_ftell): ... this.
2574 (real_fseek): Rename to ...
2575 (_bfd_real_fseek): ... this.
2576 (real_fopen): Rename to ...
2577 (_bfd_real_fopen): ... this.
2578 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2579 * libbfd.h: Regenerate.
2581 2017-02-17 Pedro Alves <palves@redhat.com>
2583 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2584 * libbfd.c (read_unsigned_leb128): Rename to ...
2585 (_bfd_read_unsigned_leb128): ... this.
2586 (read_signed_leb128): Rename to ...
2587 (_bfd_read_signed_leb128): ... this.
2588 (safe_read_leb128): Rename to ...
2589 (_bfd_safe_read_leb128): ... this.
2590 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2591 (_bfd_read_unsigned_leb128): ... this.
2592 (read_signed_leb128): Rename to ...
2593 (_bfd_read_signed_leb128): ... this.
2594 (safe_read_leb128): Rename to ...
2595 (_bfd_safe_read_leb128): ... this.
2596 * libbfd.h: Renegerate.
2598 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2600 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2601 before trying to fine matching file and line information.
2603 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2605 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2606 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2607 not match current bfd, then reload debug information. Record bfd
2608 we're loading debug info for in the stash. If we have debug
2609 informatin in the cache then perform section placement before
2612 2017-02-16 Alan Modra <amodra@gmail.com>
2615 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2616 * elfxx-target.h (elf_backend_no_page_alias): Define.
2617 (elfNN_bed): Init new field.
2618 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2619 ensure PT_LOAD segment starts on a new page.
2620 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2622 2017-02-16 Alan Modra <amodra@gmail.com>
2625 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2628 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2630 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2631 * bfd-in2.h: Regenerated.
2633 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2636 * elf32-i386.c (elf_i386_relocate_section): Allow
2637 "lea foo@GOT, %reg" in PIC.
2639 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2642 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2643 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2644 error against local IFUNC symbol without a base register for
2647 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2649 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2650 `%P: %H:' with `info->callbacks->einfo'.
2651 (ppc_elf_relocate_section): Likewise.
2652 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2653 (ppc64_elf_edit_toc): Likewise.
2654 (ppc64_elf_relocate_section): Likewise.
2656 2017-02-14 Alan Modra <amodra@gmail.com>
2658 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2659 --gc-keep-exported, and test versioned field of sym rather than
2660 looking for @ in name.
2662 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2664 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2667 2017-02-13 Nick Clifton <nickc@redhat.com>
2670 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2673 2017-02-07 Andrew Waterman <andrew@sifive.com>
2675 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2676 entry size if PLT header is written.
2678 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2680 Fix sparc64 dynamic relocation processing to use the dynamic
2682 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2683 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2686 2017-02-03 Nick Clifton <nickc@redhat.com>
2689 * coffcode.h (coff_write_object_contents): Enlarge size of
2690 s_name_buf in order to avoid compile time warning about possible
2692 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2693 32-bits of insn value before printing into buffer.
2695 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2697 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2698 `max_local_dynindx'.
2699 (mips_elf_sort_hash_table): Handle it.
2700 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2701 symbols bump up `max_local_dynindx' rather than
2702 `max_non_got_dynindx'.
2704 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2706 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2707 `min_got_dynindx', `max_unref_got_dynindx' and
2708 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2709 (mips_elf_sort_hash_table): Adjust accordingly.
2711 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2713 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2714 to access the hash table.
2716 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2718 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2719 non-NULL `htab' to the beginning.
2721 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2723 * elflink.c (elf_gc_sweep): Wrap overlong line.
2725 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2727 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2728 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2729 * elfxx-mips.c (mips_elf_link_hash_table): Add
2730 `ignore_branch_isa' member.
2731 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2732 in branch relocation calculation as an error if
2733 `ignore_branch_isa' has been set.
2734 (_bfd_mips_elf_insn32): Rename to...
2735 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2736 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2737 Handle the new parameter.
2739 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2741 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2742 local variable dynobj.
2745 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2746 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2747 executable from read-only sections into sdynrelro.
2748 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2749 dynamic relocs in sdynrelro.
2750 (elf_backend_want_dynrelro): Define.
2752 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2754 * config.bfd (*-*-rtemsaout*): Mark as removed.
2756 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2758 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2759 (arm-*-rtems*): Move to (arm*-*-eabi*).
2760 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2761 (m68-*-rtems*): Move to (m68*-*-elf*).
2763 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2765 * config.bfd (*-*-rtemscoff*): Mark as removed.
2767 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2770 * elflink.c (bfd_elf_record_link_assignment): Revert last
2771 change and don't ever clear `forced_local'. Set `mark'
2773 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2775 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2776 (bfd_elf_size_dynamic_sections): ... here.
2777 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2778 and set `mark' instead in `__tls_get_addr_opt' processing.
2779 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2781 2017-01-24 Alan Modra <amodra@gmail.com>
2783 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2784 where dynamic relocs are preferable. Allow ifunc too.
2785 (ensure_undefweak_dynamic): New function.
2786 (allocate_dynrelocs): Use it here. Move plt handling last and
2787 don't make symbols dynamic, simplifying loop. Only make undef
2788 weak symbols with GOT entries dynamic. Correct condition
2789 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2790 comments. Remove goto.
2791 (ppc_elf_relocate_section): Correct test for using dynamic
2792 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2793 to suit. Set up explicit tls_index entries and implicit GOT
2794 tls_index entries resolvable at link time for
2795 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2796 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2797 (ensure_undefweak_dynamic): New function.
2798 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2799 with GOT entries dynamic. Remove unnecessary test of
2800 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2801 (ppc64_elf_relocate_section): Correct test for using dynamic
2802 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2803 to suit. Set up explicit tls_index entries and implicit GOT
2804 tls_index entries resolvable at link time for __tls_get_addr_opt.
2805 Simplify expression to clear mem for prelink.
2807 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2809 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2811 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2813 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2814 (elf_backend_hash_symbol): Define.
2816 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2819 * elflink.c (bfd_elf_record_link_assignment): Clear any
2820 `forced_local' marking for DSO symbols that are not being
2823 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2825 * elfnn-riscv.c (riscv_elf_object_p): New function.
2827 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2830 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2832 (elf_x86_64_check_relocs): Create .eh_frame section for the
2834 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2835 .eh_frame section for the .plt.bnd section.
2836 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2837 for the .plt.bnd section.
2839 2017-01-12 Nick Clifton <nickc@redhat.com>
2842 * opncls.c (find_separate_debug_file): Add include_dirs
2843 parameter. Only include the directory part of the bfd's filename
2844 in search paths if include_dirs is true. Add a couple of extra
2845 locations for looking for debug files.
2846 ( bfd_follow_gnu_debuglink): Update invocation of
2847 find_separate_debug_file.
2848 (bfd_follow_gnu_debugaltlink): Likewise.
2849 (get_build_id): New function: Finds the build-id of the given bfd.
2850 (get_build_id_name): New function: Computes the name of the
2851 separate debug info file for a bfd, based upon its build-id.
2852 (check_build_id_file): New function: Checks to see if a separate
2853 debug info file exists at the given location, and that its
2854 build-id matches that of the original bfd.
2855 (bfd_follow_build_id_debuglink): New function: Finds a separate
2856 debug info file for a given bfd by using the build-id method.
2857 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2858 method of locating a separate debug info file before using the
2860 * bfd-in2.h: Regenerate.
2862 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2865 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2866 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2867 elf_x86_64_eh_frame_plt_got.
2868 (elf_x86_64_size_dynamic_sections): Get unwind info from
2869 elf_x86_64_bnd_arch_bed for the BND PLT.
2871 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2873 * config.bfd: Add entries for i686-redox and x86_64-redox.
2875 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2877 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2879 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2880 .eh_frame section to 4 bytes for x32.
2881 (elf_x86_64_check_relocs): Likewise.
2883 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2886 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2887 (PLT_GOT_FDE_LENGTH): Likewise.
2888 (elf_i386_plt_layout): Add eh_frame_plt_got and
2889 eh_frame_plt_got_size.
2890 (elf_i386_plt): Updated.
2891 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2892 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2893 (elf_i386_size_dynamic_sections): Allocate and initialize
2894 .eh_frame section for .plt.got.
2895 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2897 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2898 eh_frame_plt_got_size.
2899 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2900 (PLT_GOT_FDE_LENGTH): Likewise.
2901 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2902 eh_frame_plt_got_size.
2903 (elf_x86_64_arch_bed): Updated.
2904 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2905 eh_frame_plt_got_size.
2906 (elf_x86_64_nacl_arch_bed): Likewise.
2907 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2908 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2909 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2910 .eh_frame section for .plt.got.
2911 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2914 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2916 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2917 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2919 2017-01-09 Nick Clifton <nickc@redhat.com>
2921 * dwarf2.c (lookup_address_in_function_table): Return early if
2922 there are no functions in the given comp unit, or if the high
2923 address of the last function in the comp unit is less than the
2926 2017-01-09 Nick Clifton <nickc@redhat.com>
2929 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2930 message if there are too many symbols to load.
2932 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2934 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2935 if relocs are cached.
2937 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2940 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2941 for R_MICROBLAZE_GOTOFF_64.
2943 2017-01-03 Nick Clifton <nickc@redhat.com>
2945 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2946 warning about using a possibly uninitialised variable.
2948 2017-01-02 Alan Modra <amodra@gmail.com>
2950 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2951 (allocate_plt_static, allocate_dynrelocs): Use it.
2953 2017-01-02 Alan Modra <amodra@gmail.com>
2955 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2956 .PARISC.unwind section.
2958 2017-01-02 Alan Modra <amodra@gmail.com>
2961 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2962 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2963 indirect to GOT pointer relative code edit.
2965 2017-01-02 Alan Modra <amodra@gmail.com>
2967 Update year range in copyright notice of all files.
2969 For older changes see ChangeLog-2016
2971 Copyright (C) 2017 Free Software Foundation, Inc.
2973 Copying and distribution of this file, with or without modification,
2974 are permitted in any medium without royalty provided the copyright
2975 notice and this notice are preserved.
2981 version-control: never