1 2018-11-02 Alan Modra <amodra@gmail.com>
4 * elf.c (bfd_section_from_shdr): Treat SHF_ALLOC SHT_REL* sections
5 in an executable or shared library as normal sections.
7 2018-10-31 Renlin Li <renlin.li@arm.com>
9 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got
10 section for Local Exec TLS model.
12 2018-10-24 H.J. Lu <hongjiu.lu@intel.com>
15 * elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
16 defined in discarded input sections.
18 2018-10-24 Alan Modra <amodra@gmail.com>
20 * elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that
23 2018-10-23 Alan Modra <amodra@gmail.com>
26 * merge.c (_bfd_add_merge_section): Don't attempt to merge
27 sections with ridiculously large alignments.
29 2018-10-23 Alan Modra <amodra@gmail.com>
32 * elflink.c (elf_link_input_bfd): Don't segfault on finding
33 STT_TLS symbols without any TLS sections. Instead, change the
34 symbol type to STT_NOTYPE.
36 2018-10-23 Alan Modra <amodra@gmail.com>
39 * merge.c (_bfd_add_merge_section): Don't attempt to merge
40 sections where size is not a multiple of entsize.
42 2018-10-20 Alan Modra <amodra@gmail.com>
45 * elf.c (section_match): Don't require a size match for SHT_SYMTAB
48 2018-10-17 Alan Modra <amodra@gmail.com>
51 * elflink.c (_bfd_elf_link_create_dynstrtab): Match elf_object_id
52 too when choosing dynobj.
54 2018-10-16 Alan Modra <amodra@gmail.com>
56 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Simplify
57 PE_DEBUG_DATA size checks.
59 2018-10-16 Alan Modra <amodra@gmail.com>
62 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Free data
65 2018-10-16 Alan Modra <amodra@gmail.com>
68 * init.c (bfd_init): Return an unsigned int.
69 bfd-in2.h: Regenerate.
71 2018-10-15 Alan Modra <amodra@gmail.com>
74 * init.c (BFD_INIT_MAGIC): Define.
75 (bfd_init): Return BFD_INIT_MAGIC.
76 bfd-in2.h: Regenerate.
78 2018-10-13 Alan Modra <amodra@gmail.com>
82 * reloc.c (_bfd_clear_contents): Replace "location" param with
83 "buf" and "off". Bounds check "off". Return status.
84 * cofflink.c (_bfd_coff_generic_relocate_section): Update
85 _bfd_clear_contents call.
86 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Likewise.
87 * elf32-arc.c (elf_arc_relocate_section): Likewise.
88 * elf32-i386.c (elf_i386_relocate_section): Likewise.
89 * elf32-metag.c (metag_final_link_relocate): Likewise.
90 * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Likewise.
91 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
92 * elf32-visium.c (visium_elf_relocate_section): Likewise.
93 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
94 * elf64-x86-64.c *(elf_x86_64_relocate_section): Likewise.
95 * libbfd-in.h (_bfd_clear_contents): Update prototype.
96 * libbfd.h: Regenerate.
98 2018-10-09 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
100 * elflink.c (elf_link_output_extsym): Do not place symbols into a
103 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
106 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
107 add GNU_PROPERTY_X86_FEATURE_2_NEEDED to force program header
108 in non-code PT_LOAD segment.
110 2018-10-08 Alan Modra <amodra@gmail.com>
112 * elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
114 * elf.c (_bfd_elf_map_sections_to_segments): Assume file and
115 program headers are required when info->load_phdrs. Reorganize
116 code handling program headers. Generate a mapping without
117 sections just for file and program headers when -z separate-code
118 would indicate they should be on a different page to the first
121 2018-10-08 Alan Modra <amodra@gmail.com>
123 * elf.c (assign_file_positions_for_load_sections): Set p_vaddr
124 from m->p_vaddr_offset for segments without sections. Invert
125 sign of p_vaddr_offset.
126 (rewrite_elf_program_header, copy_elf_program_header): Save
127 old segment p_vaddr to p_vaddr_offset. Invert sign of
130 2018-10-08 Alan Modra <amodra@gmail.com>
132 * elf.c (get_program_header_size): Don't count PT_INTERP if
134 (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if
137 2018-10-08 Alan Modra <amodra@gmail.com>
139 * elf32-spu.c (spu_elf_modify_segment_map): Don't insert
140 overlays before segment containing headers.
142 2018-10-08 Alan Modra <amodra@gmail.com>
144 * elf.c (make_mapping): Cope with zero size array at end of
145 struct elf_segment_map.
146 (_bfd_elf_map_sections_to_segments): Likewise.
147 (rewrite_elf_program_header, copy_elf_program_header): Likewise.
148 (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
150 2018-10-05 Alan Modra <amodra@gmail.com>
152 * elf32-spu.c (spu_elf_create_sections): Make .note.spu_name
155 2018-10-05 Richard Henderson <rth@twiddle.net>
157 * bfd-in2.h: Regenerated.
158 * elf32-or1k.c: (or1k_elf_howto_table): Fix formatting for
159 R_OR1K_PLT26, Add R_OR1K_PCREL_PG21, R_OR1K_GOT_PG21,
160 R_OR1K_TLS_GD_PG21, R_OR1K_TLS_LDM_PG21, R_OR1K_TLS_IE_PG21,
161 R_OR1K_LO13, R_OR1K_GOT_LO13, R_OR1K_TLS_GD_LO13, R_OR1K_TLS_LDM_LO13,
162 R_OR1K_TLS_IE_LO13, R_OR1K_SLO13, R_OR1K_PLTA26.
163 (or1k_reloc_map): Add BFD_RELOC_OR1K_PCREL_PG21,
164 BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_TLS_GD_PG21,
165 BFD_RELOC_OR1K_TLS_LDM_PG21, BFD_RELOC_OR1K_TLS_IE_PG21,
166 BFD_RELOC_OR1K_LO13, BFD_RELOC_OR1K_GOT_LO13,
167 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_GD_LO13,
168 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_LO13,
169 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_PLTA26.
170 (elf_or1k_link_hash_table): Add field saw_plta.
171 (or1k_final_link_relocate): Add value calculations for new relocations.
172 (or1k_elf_relocate_section): Add section relocations for new
174 (or1k_write_plt_entry): New function.
175 (or1k_elf_finish_dynamic_sections): Add support for PLTA relocations
176 using new l.adrp instruction. Cleanup PLT relocation code generation.
177 * libbfd.h: Regenerated.
178 * reloc.c: Add BFD_RELOC_OR1K_PCREL_PG21, BFD_RELOC_OR1K_LO13,
179 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_GOT_LO13,
180 BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_TLS_GD_PG21,
181 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_LDM_PG21,
182 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_PG21,
183 BFD_RELOC_OR1K_TLS_IE_LO13.
185 2018-10-05 Richard Henderson <rth@twiddle.net>
187 * elf32-or1k.c (or1k_elf_relocate_section): Add error for unknown
188 relocations. Add error for non zero addend with plt and got
189 relocations. Add error for got and plt references against dynamic, non
190 local, symbols. Add error when linking non shared liraries with
193 2018-10-05 Richard Henderson <rth@twiddle.net>
194 Stafford Horne <shorne@gmail.com>
196 * bfd-in2.h: Regenerated.
197 * elf32-or1k.c (N_ONES): New macro.
198 (or1k_elf_howto_table): Fix R_OR1K_PLT26 to complain on overflow.
199 Add definitions for R_OR1K_TLS_TPOFF, R_OR1K_TLS_DTPOFF,
200 R_OR1K_TLS_DTPMOD, R_OR1K_AHI16, R_OR1K_GOTOFF_AHI16,
201 R_OR1K_TLS_IE_AHI16, R_OR1K_TLS_LE_AHI16, R_OR1K_SLO16,
202 R_OR1K_GOTOFF_SLO16, R_OR1K_TLS_LE_SLO16.
203 (or1k_reloc_map): Add entries for BFD_RELOC_HI16_S,
204 BFD_RELOC_LO16_GOTOFF, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_S_GOTOFF,
205 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
206 BFD_RELOC_OR1K_SLO16, BFD_RELOC_OR1K_GOTOFF_SLO16,
207 BFD_RELOC_OR1K_TLS_LE_SLO16.
208 (or1k_reloc_type_lookup): Change search loop to start ad index 0 and
209 also check results before returning.
210 (or1k_reloc_name_lookup): Simplify loop to use R_OR1K_max as index
212 (or1k_final_link_relocate): New function.
213 (or1k_elf_relocate_section): Add support for new AHI and SLO
214 relocations. Use or1k_final_link_relocate instead of generic
215 _bfd_final_link_relocate.
216 (or1k_elf_check_relocs): Add support for new AHI and SLO relocations.
217 * reloc.c: Add new enums for BFD_RELOC_OR1K_SLO16,
218 BFD_RELOC_OR1K_GOTOFF_SLO16, BFD_RELOC_OR1K_TLS_IE_AHI16,
219 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
220 BFD_RELOC_OR1K_TLS_LE_SLO16. Remove unused BFD_RELOC_OR1K_GOTOFF_HI16
221 and BFD_RELOC_OR1K_GOTOFF_LO16.
222 * libbfd.h: Regenerated.
224 2018-10-04 Jim Wilson <jimw@sifive.com>
226 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): In dynobj->sections
227 loop, handle htab->sdyntdata section.
229 2018-10-04 Jose E. Marchesi <jose.marchesi@oracle.com>
231 * elf64-sparc.c (elf64_sparc_output_arch_syms): Do notcorrect the
232 impact of STT_REGISTER symbols in the dynsym sh_info here...
233 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): ...but
236 2018-10-03 H.J. Lu <hongjiu.lu@intel.com>
239 * elf.c (get_program_header_size): Put all adjacent SHT_NOTE
240 sections with the same section alignment into a single PT_NOTE
241 segment. Check SHT_NOTE section type instead of section name.
242 (_bfd_elf_map_sections_to_segments): Likewise.
244 2018-10-03 Millan Wolff <mail@milianw.de>
247 * dwarf2.c (find_abstract_instance): Allow recursive invocations
248 of find_abstract_instance to override the name variable.
250 2018-10-03 Nick Clifton <nickc@redhat.com>
252 * po/pt.po: Updated Portuguese translation.
254 2018-10-01 Cupertino Miranda <cmiranda@synopsys.com>
256 * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take TLS
257 section alignment in consideration for this relocation. Fixed TCB_SIZE
258 offset size to include section alignment.
259 (get_got_entry_list_for_symbol): Changed.
260 * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
261 (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
262 (arc_special_overflow_checks): Fixed TCB_SIZE offsize to include
264 (elf_arc_check_relocs): Changed.
265 (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
266 (struct elf_arc_link_hash_entry): Moved and changed.
267 (elf_arc_link_hash_newfunc): Changed.
268 (arc_elf_link_hash_table_create): Removed old initializations.
269 (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
271 2018-09-28 H.J. Lu <hongjiu.lu@intel.com>
273 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Use
274 elfclass instead of bed->s->elfclass.
276 2018-09-27 Jim Wilson <jimw@sifive.com>
278 * elfnn-riscv.c (riscv_init_pcgp_relocs): Add explanatory comment.
279 (riscv_free_pcgp_relocs, riscv_record_pcgp_reloc): Likewise.
280 (riscv_find_pcgp_hi_reloc, riscv_reocrd_pcgp_lo_reloc): Likewise.
281 (riscv_find_pcgp_lo_reloc): Likewise.
282 (riscv_delete_pcgp_hi_reloc, riscv_use_pcgp_hi_reloc): Delete.
283 (riscv_delete_pcgp_lo_reloc): Likewise.
284 (_bfd_riscv_relax_pc): Don't call riscv_use_pcgp_hi_reloc. Replace
285 calls to riscv_delete_pcgp_lo_reloc and riscv_delete_pcgp_hi_reloc
286 with TRUE. Mark abfd arg as ATTRIBUTE_UNUSED.
288 2018-09-25 Jim Wilson <jimw@sifive.com>
290 * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
291 return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
292 and return FALSE. Return TRUE at end.
293 (riscv_make_plt_entry): Likewise.
294 (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
295 (riscv_elf_finish_dynamic_sections): Update call to
296 riscv_make_plt_header.
298 2018-09-24 Jim Wilson <jimw@sifive.com>
300 * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
301 hi_sec_off which is symbol address with addend subtracted. Use in
302 riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
304 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
305 overflow with addend. Use reloc_dangerous instead of reloc_overflow.
306 Add strings for the two errors handled here.
307 (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
308 comment. Only give error with addend when used with section symbol.
309 In case bfd_reloc_dangerous, update error string.
311 2018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
314 * elf.c (_bfd_elf_write_object_contents): Return from function
315 early if abfd->direction == both_direction.
317 2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
319 * configure.ac: Check for fls.
320 * elf32-nds32.c (fls): Only define if !HAVE_FLS.
321 * config.in: Re-generate.
322 * configure: Re-generate.
324 2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
326 * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
327 duplicate `case' selectors.
329 2018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
331 * elf32-nds32.c (nds32_elf_relax_loadstore):
332 Remove the unused target features.
333 (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
334 (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
335 nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
336 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
337 nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
338 calculate_plt_offset, calculate_got_memory_address,
339 nds32_elf_check_dup_relocs): Removed.
341 * elf32-nds32.h: Remove the unused macros and defines.
342 (elf_nds32_link_hash_table): Remove the unused variable.
343 (bfd_elf32_nds32_set_target_option): Update prototype.
344 (nds32_elf_ex9_init): Removed.
345 * elf32-nds32.c (nds32_convert_32_to_16): Updated.
346 * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
347 to initialize array nds32_elf_howto_table in any order
348 without lots of EMPTY_HOWTO.
349 (nds32_reloc_map): Updated.
350 * reloc.c: Add BFD_RELOC_NDS32_LSI.
351 * bfd-in2.h: Regenerated.
352 * bfd/libbfd.h: Regenerated.
353 * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
354 (nds32_reloc_map): Likewise.
355 (nds32_elf_relax_flsi): New function.
356 (nds32_elf_relax_section): Support floating load/store relaxation.
357 * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
359 (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
360 (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
361 (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
362 nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
364 (nds32_info_to_howto_rel): Add BFD_ASSERT.
365 (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
366 nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
367 nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
368 bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
369 (nds32_elf_final_sda_base): Improve it to find the better gp value.
370 (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
371 * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
372 (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
373 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
374 (create_got_section): Likewise.
375 (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
376 nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
377 (nds32_elf_check_relocs): Fix the issue that the shared library may
378 has TEXTREL entry in the dynamic section.
379 (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
380 since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
381 (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
383 (calculate_offset): Remove the unused parameter `pic_ext_target' and
386 (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
387 will cause some errors for our test cases.
388 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
390 * reloc.c: Add TLS relocations.
391 * libbfd.h: Regenerated.
392 * bfd-in2.h: Regenerated.
393 * elf32-nds32.h (struct section_id_list_t): New.
394 (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
395 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
397 (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
399 (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
400 elf_nds32_link_hash_table): Updated.
401 * elf32-nds32.c (enum elf_nds32_tls_type): New.
402 (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
403 (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
404 fls, ones32, list_insert, list_insert_sibling, dump_chain,
405 elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
406 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
407 (elf_nds32_obj_tdata): Add new fields.
408 (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
409 (nds32_elf_howto_table): Add TLS relocations.
410 (nds32_reloc_map): Likewise.
411 (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
412 nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
413 nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
414 nds32_elf_check_relocs, allocate_dynrelocs): Updated.
415 (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
416 (dtpoff_base): Rename it to `gottpof' and then update it.
418 2018-09-20 Alan Modra <amodra@gmail.com>
421 * peXXigen.c (pe_print_edata): Correct export address table
422 overflow checks. Check dataoff against section size too.
424 2018-09-20 Alan Modra <amodra@gmail.com>
427 * dwarf2.c (read_section): Error when attempting to malloc
428 "(bfd_size_type) -1".
429 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
430 function_name. Bounds check reloc address. Formatting. Ensure
431 .stabstr zero terminated.
433 2018-09-18 Nick Clifton <nickc@redhat.com>
436 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
437 ELF section has contents and size larger than the file size.
439 2018-09-14 Maciej W. Rozycki <macro@mips.com>
442 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
443 (_bfd_mips_elf_linker_flags): Update prototype.
444 * elf32-mips.c (elf_backend_hide_symbol): New macro.
445 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
446 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
447 * elfxx-mips.c (mips_elf_link_hash_table): Add
448 `use_absolute_zero' and `gnu_target' members.
449 (mips_elf_record_global_got_symbol): Call
450 `_bfd_mips_elf_hide_symbol' rather than
451 `_bfd_elf_link_hash_hide_symbol'.
452 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
453 (mips_elf_obtain_contents): Reorder function.
454 (mips_elf_nullify_got_load): New function.
455 (mips_elf_calculate_relocation): Add `contents' parameter.
456 Nullify GOT loads or if it is not possible, then redirect GOT
457 relocations to the `__gnu_absolute_zero' symbol, for references
458 that are supposed to resolve to zero.
459 (mips_elf_define_absolute_zero): New function.
460 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
461 `mips_elf_calculate_relocation' for references made via the GOT
462 that are supposed to resolve to zero.
463 (_bfd_mips_elf_hide_symbol): New function.
464 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
465 set the `gnu_target' member of the MIPS hash table.
466 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
467 (_bfd_mips_post_process_headers): Use it.
469 2018-09-14 Maciej W. Rozycki <macro@mips.com>
471 * elfxx-mips.c (mips_elf_store_contents): New function...
472 (mips_elf_perform_relocation): ... factored out from here.
474 2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
476 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
478 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
480 2018-09-14 Alan Modra <amodra@gmail.com>
483 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
484 fields in debug sections when reloc is against an undefined symbol
485 and called from bfd_simple_get_relocated_section_contents or
487 * dwarf2.c (find_abstract_instance): Return true for zero offset
488 DW_FORM_ref_addr without returning values.
490 2018-09-06 Alan Modra <amodra@gmail.com>
493 * elf32-avr.c (elf_avr_special_sections): New.
494 (elf_backend_special_sections): Define.
496 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
498 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
499 error when an invalid relocation is passed; this is already done
500 by `_bfd_sparc_elf_info_to_howto_ptr'.
502 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
504 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
505 error when an invalid symbol index is retrieved in ELF64_R_SYM of
506 a relocation seen in an input file.
508 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
509 Alan Modra <amodra@gmail.com>
512 elf.c (copy_elf_program_header): When first segment contains
513 only the headers and SHT_NOBITS sections, use segment p_filesz
514 to calculate header and padding size. Use filepos of the first
517 2018-08-31 H.J. Lu <hongjiu.lu@intel.com>
520 * archures.c (bfd_arch_get_compatible): Allow an IR object with
521 unknown architecture.
523 2018-08-31 Alan Modra <amodra@gmail.com>
525 * elf64-ppc.c (num_relocs_for_offset): New function.
526 (emit_relocs_for_offset): New function.
527 (use_global_in_relocs): New function, split out from..
528 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
529 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
530 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
532 2018-08-31 Alan Modra <amodra@gmail.com>
534 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
535 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
536 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
538 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
539 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
540 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
541 * bfd-in2.h: Regenerate.
542 * libbfd.h: Regenerate.
544 2018-08-31 Alan Modra <amodra@gmail.com>
546 * elf64-ppc.c: Correct _notoc stub comments.
547 (ppc_build_one_stub): Simplify output of branch for notoc
548 long branch stub. Don't include label offset of 8 bytes in
549 "off" calculation for notoc plt stub. Don't emit insns to get pc.
550 (build_offset): Emit insns to get pc here instead.
551 (size_offset): Add 4 extra insns.
552 (plt_stub_size): Adjust for "off" and size_offset changes.
553 (ppc_size_one_stub): Rearrange code into a switch, duplicating
554 some to better match ppc_build_one_stub.
556 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
558 * archures.c (bfd_architecture): New machine
559 bfd_mach_mips_gs264e.
560 * bfd-in2.h (bfd_architecture): Likewise.
561 * cpu-mips.c (enum I_xxx): Likewise.
562 (arch_info_struct): Likewise.
563 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
565 (mips_set_isa_flags): Likewise.
566 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
567 bfd_mach_mips_gs464e extension.
569 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
571 * archures.c (bfd_architecture): New machine
572 bfd_mach_mips_gs464e.
573 * bfd-in2.h (bfd_architecture): Likewise.
574 * cpu-mips.c (enum I_xxx): Likewise.
575 (arch_info_struct): Likewise.
576 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
578 (mips_set_isa_flags): Likewise.
579 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
580 bfd_mach_mips_gs464 extension.
582 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
584 * archures.c (bfd_architecture): Rename
585 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
586 * bfd-in2.h (bfd_architecture): Likewise.
587 * cpu-mips.c (enum I_xxx): Likewise.
588 (arch_info_struct): Likewise.
589 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
590 (mips_set_isa_flags): Likewise.
591 (mips_mach_extensions): Likewise.
592 (bfd_mips_isa_ext_mach): Likewise.
593 (bfd_mips_isa_ext): Likewise.
594 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
596 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
598 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
600 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
602 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
603 isa_ext for infer ABI flags.
604 (print_mips_ases): Add Loongson EXT extension.
606 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
608 * elfxx-mips.c (print_mips_ases): Add CAM extension.
610 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
612 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
613 out the GNU_PROPERTY_X86_UINT32_VALID bit.
615 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
618 * elf.c (_bfd_elf_get_symbol_version_string): Return
619 _("<corrupt>") for corrupt symbol version info.
621 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
623 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
624 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
625 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
626 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
627 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
628 (_bfd_x86_elf_merge_gnu_properties): Likewise.
629 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
630 instead of X86_ISA_1_NEEDED.
631 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
632 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
633 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
634 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
635 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
637 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
639 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
640 GNU_PROPERTY_X86_UINT32_VALID bit.
641 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
642 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
644 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
647 * plugin.c (struct plugin_list_entry): New structure.
648 (plugin_list): New variable.
649 (try_load_plugin): Place opened plugins on a list. Ensure that
650 the refcount in the dynamic loader is kept at 1.
652 2018-08-23 Alan Modra <amodra@gmail.com>
654 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
657 2018-08-23 Nick Clifton <nickc@redhat.com>
659 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
660 code with an assertion.
662 2018-08-23 Nick Clifton <nickc@redhat.com>
665 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
666 it to prevent walking off the end of the table.
667 (coff_get_normalized_symtab): Pass internal_end pointer to
670 2018-08-23 Alan Modra <amodra@gmail.com>
672 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
673 unresolved_reloc on ppc_stub_plt_call_notoc.
675 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
678 * development.sh (experimental): New.
680 2018-08-22 Helge Deller <deller@gmx.de>
681 Nick Clifton <nickc@redhat.com>
683 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
684 the section type of the .PARISC.unwind section on 64-bit binaries
685 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
686 Add comment about the sh_entsize value.
688 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
691 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
692 stub's target, since it may have been changed after the layout.
694 2018-08-21 John Darington <john@darrington.wattle.id.au>
696 * elf32-s12z.c (opru18_reloc): New function.
697 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
699 2018-08-21 mephi42 <mephi42@gmail.com>
702 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
703 data is already considered filled.
705 2018-08-21 Alan Modra <amodra@gmail.com>
707 * elf64-ppc.c (HOW): Define.
709 (ppc64_elf_howto_raw): Use HOW to initialize entries.
710 * elf32-ppc.c (HOW): Define.
711 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
712 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
714 2018-08-21 Alan Modra <amodra@gmail.com>
716 * reloc.c (reloc_howto_type): Typedef.
717 (bfd_symbol): Delete forward declaration.
718 (struct reloc_howto_struct): Add "negate" field. Make "size",
719 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
720 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
721 Rearrange for better packing. Revise comments.
722 (HOWTO): Map to rearranged reloc_howto_struct.
723 (bfd_get_reloc_size): Delete now unused cases.
724 (read_reloc, write_reloc): Likewise.
725 (apply_reloc, _bfd_relocate_contents): Test howto->negate
726 rather than howto->size < 0 for negated relocation values.
727 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
728 signed/unsigned warning.
729 (xcoff_ppc_relocate_section): Delete "condition is always false"
731 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
732 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
734 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
735 size 16 for ALPHA_R_LINKAGE.
736 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
738 * bfd-in.h (reloc_howto_type): Delete.
739 * bfd-in2.h: Regenerate.
741 2018-08-21 Alan Modra <amodra@gmail.com>
743 * reloc.c (HOWTO): Revise comment.
744 (NEWHOWTO, HOWTO_PREPARE): Delete.
745 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
746 reloc_howto_struct with reloc_howto_type.
747 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
748 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
749 * elf-hppa.h (HOW): Define.
750 (elf_hppa_howto_table): Use it to simplify this table, correcting
751 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
752 R_PARISC_LTOFF_FPTR16DF.
753 * elf32-mep.c (MEPREL): Use HOWTO.
754 * bfd-in2.h: Regenerate.
756 2018-08-20 Alan Modra <amodra@gmail.com>
758 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
760 (mmo_init): Don't init valid_mmo_symbol_character_set.
762 2018-08-20 Alan Modra <amodra@gmail.com>
764 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
766 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
769 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
770 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
771 backend fixup_gnu_properties if it isn't NULL. Discard
772 .note.gnu.property section if all properties have been removed.
773 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
774 (elfNN_bed): Initialize fixup_gnu_properties.
775 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
777 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
779 (elf_backend_fixup_gnu_properties): New.
781 2018-08-16 Alan Modra <amodra@gmail.com>
783 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
786 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
789 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
790 (BFD32_LIBS_CFILES): Add elf-properties.c.
791 (BFD32_BACKENDS): Remove elf-properties.lo.
792 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
793 * configure.ac (elf): Remove elf-properties.lo.
794 * Makefile.in: Regenerated.
795 * configure: Likewise.
797 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
800 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
801 add X86_ISA_1_NEEDED property only if existing properties won't
804 2018-08-11 Alan Modra <amodra@gmail.com>
806 * reloc.c (bfd_get_reloc_size): Sort switch.
807 (read_reloc, write_reloc, apply_reloc): New functions.
808 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
809 (_bfd_relocate_contents): Use read_reloc and write_reloc.
810 (_bfd_clear_contents): Likewise.
812 2018-08-11 John Darrington <john@darrington.wattle.id.au>
814 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
815 (_bfd_clear_contents): Likewise.
816 (bfd_perform_relocation): Likewise.
817 (bfd_install_relocation): Likewise.
819 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
822 * elflink.c (bfd_elf_record_link_assignment): Always clear
823 h->verinfo.verdef when overriding a dynamic definition.
825 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
828 * elf-properties.c (elf_get_gnu_property_section_size): Always
829 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
830 (elf_write_gnu_properties): Likewise.
832 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
835 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
836 calling _bfd_elf_convert_gnu_property_size to convert
837 .note.gnu.property section size.
838 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
839 calling _bfd_elf_convert_gnu_properties to convert
840 .note.gnu.property section.
841 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
842 (_bfd_elf_convert_gnu_properties): Likewise.
843 * elf-properties.c (elf_get_gnu_property_section_size): New
845 (elf_write_gnu_properties): Likewise.
846 (_bfd_elf_convert_gnu_property_size): Likewise.
847 (_bfd_elf_convert_gnu_properties): Likewise.
848 (_bfd_elf_link_setup_gnu_properties): Use
849 elf_get_gnu_property_section_size and elf_write_gnu_properties.
851 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
854 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
855 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
856 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
857 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
858 GNU_PROPERTY_X86_ISA_1_USED, property.
860 2018-08-07 Alan Modra <amodra@gmail.com>
862 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
863 Add lr_restore, eh_size and eh_base.
864 (eh_advance, eh_advance_size): New functions.
865 (build_tls_get_addr_stub): Emit EH info for stub.
866 (ppc_build_one_stub): Likewise for _notoc stubs.
867 (ppc_size_one_stub): Size EH info for stub.
868 (group_sections): Init new map_stub fields.
869 (stub_eh_frame_size): Delete.
870 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
872 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
873 offset to stub section here..
874 (ppc64_elf_finish_dynamic_sections): ..rather than here.
876 2018-08-07 Alan Modra <amodra@gmail.com>
878 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
879 instruction of __tls_get_addr_opt stub.
880 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
881 dealing with __tls_get_addr_opt stub.
882 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
884 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
886 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
887 efalgs only when in/out exists.
888 (elf32_arc_section_from_shdr): Don't complain about 0x0c
889 section type. It is mwdt compiler specific.
891 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
893 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
895 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
897 * elf32-arc.c (arc_elf_merge_attributes): Handle
900 2018-08-05 Alan Modra <amodra@gmail.com>
902 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
903 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
904 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
905 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
906 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
907 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
908 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
909 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
910 ppc_stub_plt_call_both.
911 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
912 (build_offset, size_offset): New functions.
913 (plt_stub_size): Support plt_call_notoc and plt_call_both.
914 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
915 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
916 (ppc64_elf_size_stubs): Likewise, and new stubs.
917 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
918 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
919 * bfd-in2.h: Regenerate.
920 * libbfd.h: Regenerate.
922 2018-08-05 Alan Modra <amodra@gmail.com>
924 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
926 2018-08-02 Jim Wilson <jimw@sifive.com>
928 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
929 add SEC_LINKER_CREATED flag.
931 2018-08-01 Nick Clifton <nickc@redhat.com>
933 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
934 about potentially truncated strncpy operations.
935 (_bfd_xcoff_put_symbol_name): Likewise.
937 * elf32-avr.c (avr_stub_name): Check for a NULL return from
940 2018-08-01 Zenith <zenith432@users.sourceforge.net>
943 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
945 (try_claim): Always close the file descriptor at the end of the
947 (try_load_plugin): If a plugin has already been registered, then
948 skip the dlopen and onload steps and go straight to claiming the
949 file. If these is an error, close the plugin.
951 2018-08-01 Alan Modra <amodra@gmail.com>
953 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
954 (ppc_build_one_stub): Don't set stub_offset, instead assert that
955 it is sane. Don't adjust stub_offset for alignment. Adjust size
956 calculation. Use "targ" temp when calculating offsets.
957 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
958 calculating offsets. Adjust for alignment before setting
959 tls_get_addr_opt_bctrl.
961 2018-08-01 Alan Modra <amodra@gmail.com>
963 * po/SRC-POTFILES.in: Regenerate.
965 2018-07-30 Nick Clifton <nickc@redhat.com>
968 * elf32-sh.c (sh_elf_relocate_section): When processing
969 translation relocs, fail if the relocation offset is too small.
970 Replace BFD_ASSERTs with more helpful error messages.
972 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
974 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
975 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
976 * Makefile.in: Regenerated.
977 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
978 related bfd_mach defines.
979 (bfd_csky_arch): Declare.
980 (bfd_archures_list): Add C-SKY.
981 * bfd-in.h (elf32_csky_build_stubs): Declare.
982 (elf32_csky_size_stubs): Declare.
983 (elf32_csky_next_input_section: Declare.
984 (elf32_csky_setup_section_lists): Declare.
985 * bfd-in2.h: Regenerated.
986 * config.bfd: Add C-SKY.
987 * configure.ac: Likewise.
988 * configure: Regenerated.
989 * cpu-csky.c: New file.
990 * elf-bfd.h (enum elf_target_id): Add C-SKY.
991 * elf32-csky.c: New file.
992 * libbfd.h: Regenerated.
993 * reloc.c: Add C-SKY relocations.
994 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
995 (_bfd_target_vector): Add C-SKY target vector entries.
997 2018-07-27 John Darrington <john@darrington.wattle.id.au>
999 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
1001 2018-07-27 John Darrington <john@darrington.wattle.id.au>
1003 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
1004 (bfd_get_24, bfd_put_24): New macros.
1005 * bfd-in2.h: Regenerate.
1007 2018-07-27 John Darrington <john@darrington.wattle.id.au>
1009 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
1011 2018-07-26 Alan Modra <amodra@gmail.com>
1013 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
1014 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
1016 2018-07-25 Alan Modra <amodra@gmail.com>
1018 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
1019 Avoid trashing toff with added when used as a symbol index.
1020 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
1021 creating unnecessary fixups when relocatable.
1023 2018-07-25 Alan Modra <amodra@gmail.com>
1025 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
1026 -Wstringop-truncation warning for gcc-8.0 too.
1027 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1028 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
1029 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1030 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
1031 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1033 2018-07-24 Alan Modra <amodra@gmail.com>
1036 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
1037 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
1039 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
1041 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
1042 relocation sections consistency check to always check both
1043 .rela.dyn and .rela.plt when they exist. Rearrange variable
1044 definition and assignment places.
1046 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
1048 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
1049 relocations section for dynamic undefined weak symbols when
1050 linking a shared object.
1052 2018-07-23 Tom Tromey <tom@tromey.com>
1054 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
1056 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
1058 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
1059 cleanup for the case of a global symbol that binds locally. Also
1060 install a value in the GOT slot in the case of a local symbol in
1063 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
1066 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
1067 separate code program header is needed, make sure that the first
1068 read-only PT_LOAD segment has no code by adding a
1069 GNU_PROPERTY_X86_ISA_1_USED note.
1071 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
1072 Maciej W. Rozycki <macro@mips.com>
1074 * elfxx-mips.c (print_mips_ases): Add MMI extension.
1076 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1078 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
1079 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
1080 dynamic relocation section will be discarded from output.
1081 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
1082 the dynamic relocation section will be retained in output.
1084 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1086 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
1087 checks for defined weak symbols.
1089 2018-07-17 Maciej W. Rozycki <macro@mips.com>
1091 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
1092 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
1093 whether the symbol is absolute.
1094 (nds32_elf_relax_lo12): Likewise.
1095 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1096 (elfNN_aarch64_check_relocs): Likewise.
1097 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
1098 (bfd_xcoff_import_symbol): Likewise.
1099 (xcoff_write_global_symbol): Likewise.
1101 2018-07-17 Maciej W. Rozycki <macro@mips.com>
1103 * linker.c (bfd_is_abs_symbol): New macro.
1104 * bfd-in2.h: Regenerate.
1106 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1108 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
1109 (elfcore_write_ppc_ppr): Likewise.
1110 (elfcore_write_ppc_dscr): Likewise.
1111 (elfcore_write_ppc_ebb): Likewise.
1112 (elfcore_write_ppc_pmu): Likewise.
1113 (elfcore_write_ppc_tm_cgpr): Likewise.
1114 (elfcore_write_ppc_tm_cfpr): Likewise.
1115 (elfcore_write_ppc_tm_cvmx): Likewise.
1116 (elfcore_write_ppc_tm_cvsx): Likewise.
1117 (elfcore_write_ppc_tm_spr): Likewise.
1118 (elfcore_write_ppc_tm_ctar): Likewise.
1119 (elfcore_write_ppc_tm_cppr): Likewise.
1120 (elfcore_write_ppc_tm_cdscr): Likewise.
1121 * elf.c (elfcore_write_ppc_tar): New function.
1122 (elfcore_write_ppc_ppr): Likewise.
1123 (elfcore_write_ppc_dscr): Likewise.
1124 (elfcore_write_ppc_ebb): Likewise.
1125 (elfcore_write_ppc_pmu): Likewise.
1126 (elfcore_write_ppc_tm_cgpr): Likewise.
1127 (elfcore_write_ppc_tm_cfpr): Likewise.
1128 (elfcore_write_ppc_tm_cvmx): Likewise.
1129 (elfcore_write_ppc_tm_cvsx): Likewise.
1130 (elfcore_write_ppc_tm_spr): Likewise.
1131 (elfcore_write_ppc_tm_ctar): Likewise.
1132 (elfcore_write_ppc_tm_cppr): Likewise.
1133 (elfcore_write_ppc_tm_cdscr): Likewise.
1134 (elfcore_write_register_note): Call them.
1135 (elfcore_grok_ppc_tar): New function.
1136 (elfcore_grok_ppc_ppr): Likewise.
1137 (elfcore_grok_ppc_dscr): Likewise.
1138 (elfcore_grok_ppc_ebb): Likewise.
1139 (elfcore_grok_ppc_pmu): Likewise.
1140 (elfcore_grok_ppc_tm_cgpr): Likewise.
1141 (elfcore_grok_ppc_tm_cfpr): Likewise.
1142 (elfcore_grok_ppc_tm_cvmx): Likewise.
1143 (elfcore_grok_ppc_tm_cvsx): Likewise.
1144 (elfcore_grok_ppc_tm_spr): Likewise.
1145 (elfcore_grok_ppc_tm_ctar): Likewise.
1146 (elfcore_grok_ppc_tm_cppr): Likewise.
1147 (elfcore_grok_ppc_tm_cdscr): Likewise.
1148 (elfcore_grok_note): Call them.
1150 2018-07-11 Maciej W. Rozycki <macro@mips.com>
1152 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1153 than `!bfd_link_pic' in determining the dynamic symbol index.
1154 Avoid the index of -1.
1155 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
1156 moving `dyn' to the beginning of the function block.
1158 2018-07-11 Maciej W. Rozycki <macro@mips.com>
1159 Rich Felker <bugdal@aerifal.cx>
1162 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1163 than `bfd_link_pic' to determine whether dynamic relocations are
1165 (mips_elf_initialize_tls_slots): Likewise.
1167 2018-07-10 Maciej W. Rozycki <macro@mips.com>
1169 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
1170 to `remove_section'.
1172 2018-07-10 Alan Modra <amodra@gmail.com>
1174 * elf32-xgate.h: Delete.
1175 * elf32-xgate.c: Delete unnecessary forward declarations, add two
1176 that are now needed.
1177 (xgate_elf_bfd_link_hash_table_create)
1178 (xgate_elf_bfd_link_hash_table_free)
1179 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
1180 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
1181 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
1182 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
1183 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
1184 (elf32_xgate_post_process_headers): Delete.
1185 (elf32_xgate_backend_symbol_processing): New function.
1186 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
1187 (_bfd_xgate_elf_print_private_bfd_data): Make static.
1188 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
1189 (elf_backend_relocate_section, elf_backend_object_p)
1190 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
1191 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
1192 (bfd_elf32_bfd_link_hash_table_create)
1193 (bfd_elf32_bfd_set_private_flags)
1194 (xgate_stub_hash_lookup): Don't define.
1195 (elf_backend_symbol_processing): Define.
1196 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
1198 2018-07-09 Maciej W. Rozycki <macro@mips.com>
1200 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
1201 `->needs_lazy_stub' if the stubs output section is the absolute
1204 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
1207 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
1208 * configure: Regenerated.
1210 2018-07-09 Alan Modra <amodra@gmail.com>
1212 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
1213 _bfd_elf_post_process_headers.
1215 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
1217 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
1218 space for dynamic relocation for undefined weak symbol.
1219 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
1220 relocation for undefined weak symbols.
1221 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
1222 section for relocations against undefined weak symbols.
1224 2018-07-06 Alan Hayward <alan.hayward@arm.com>
1226 * elf.c (elfcore_grok_aarch_sve): New function.
1227 (elfcore_grok_note): Check for Aarch64 SVE.
1228 (elfcore_write_aarch_sve): New function.
1229 (elfcore_write_register_note): Check for Aarch64 SVE.
1230 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
1232 2018-07-06 Alan Modra <amodra@gmail.com>
1234 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
1235 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
1236 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1237 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1238 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
1239 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1240 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1242 2018-07-05 Jim Wilson <jimw@sifive.com>
1244 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
1245 (riscv64*-*-*): Likewise.
1246 (riscv-*-*): Add as an alias for riscv32*-*-*.
1248 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
1251 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
1252 ISA properties with empty bits.
1254 2018-07-05 Nick Clifton <nickc@redhat.com>
1256 * po/ru.po: Updated Russian translation.
1258 2018-07-05 Alan Modra <amodra@gmail.com>
1260 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
1261 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
1262 on mismatch. Remove "warning: " from messages. Track last bfd
1264 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
1265 _bfd_elf_ppc_merge_fp_attributes.
1266 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
1267 from _bfd_elf_ppc_merge_fp_attributes.
1269 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
1271 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
1272 * Makefile.in: Regenerated.
1274 2018-07-03 Alan Modra <amodra@gmail.com>
1276 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
1279 2018-07-03 Alan Modra <amodra@gmail.com>
1281 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
1282 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
1283 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
1284 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
1285 incompatible attribute.
1286 (ppc_elf_merge_obj_attributes): Likewise. Return
1287 _bfd_elf_merge_object_attributes result.
1288 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
1289 _bfd_elf_merge_object_attributes result.
1291 2018-07-03 Alan Modra <amodra@gmail.com>
1294 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
1295 in discarded sections.
1297 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1299 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
1300 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
1303 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1305 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
1306 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
1307 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
1308 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
1309 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
1310 R_MICROMIPS_PC23_S2 relocation entries.
1311 (micromips_elf64_howto_table_rela): Likewise.
1312 (micromips_reloc_map): Likewise.
1313 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
1314 (elf_micromips_howto_table_rela): Likewise.
1315 (micromips_reloc_map): Likewise.
1317 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
1320 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
1321 R_X86_64_converted_reloc_bit bit.
1323 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
1324 Tom Tromey <tom@tromey.com>
1328 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
1329 (bfd_mach_o_close_and_cleanup): Redefine.
1330 * archive.c (_bfd_unlink_from_archive_parent): New function,
1332 (_bfd_archive_close_and_cleanup): ..here.
1333 (bfd_generic_archive_p): Do not clear archive's format.
1334 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
1335 * libbfd.h: Regenerate.
1337 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1339 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
1340 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
1341 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
1342 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
1343 * bfd-in2.h: Regenerate.
1344 * cpu-arm.c (arch_info_struct): Add entries for above new
1345 bfd_mach_arm values.
1346 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
1347 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
1348 architectures. Force assert failure for any new Tag_CPU_arch value.
1350 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1352 * doc/bfdint.texi: Use command-line consistently when used in a
1354 * doc/bfdsumm.texi: Likewise.
1356 2018-06-29 Maciej W. Rozycki <macro@mips.com>
1358 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
1359 visibility check made for undefined weak symbols.
1361 2018-06-26 Nick Clifton <nickc@redhat.com>
1363 * po/uk.po: Updated Ukranian translation.
1365 2018-06-25 Nick Clifton <nickc@redhat.com>
1367 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
1368 for malloc returning NULL.
1369 (_bfd_aarch64_erratum_843419_fixup): Check for
1370 _bfd_aarch64_erratum_835769_stub_name returning NULL.
1372 2018-06-24 Nick Clifton <nickc@redhat.com>
1374 * po/bfd.pot: Regenerate.
1376 2018-06-24 Nick Clifton <nickc@redhat.com>
1378 * version.m4: Update version string to 2.31.51.
1379 * configure: Regenerate.
1381 2018-06-24 Nick Clifton <nickc@redhat.com>
1383 2.31 branch created.
1385 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1387 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
1388 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
1390 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1392 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
1393 EI_ABIVERSION setting together.
1395 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1397 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
1398 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
1399 (MIPS_LIBC_ABI_MAX): New enumeration constants.
1400 (_bfd_mips_post_process_headers): Use them in place of magic
1403 2018-06-21 Jim Wilson <jimw@sifive.com>
1405 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
1406 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
1408 2018-06-21 Alan Modra <amodra@gmail.com>
1410 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
1411 * doc/Makefile.in: Regenerate.
1413 2018-06-20 Renlin Li <renlin.li@arm.com>
1415 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
1416 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1417 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1418 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1419 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1420 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1421 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1422 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1423 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1425 2018-06-20 Nick Clifton <nickc@redhat.com>
1428 * opncls.c (get_build_id): Check for a negative or excessive data
1429 size in the build-id note.
1431 2018-06-20 Nick Clifton <nickc@redhat.com>
1434 * mach-o.c (cputype): New function.
1435 (cpusubtype): New function.
1436 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1437 values in the MACH-O file header.
1438 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1439 cpusubtype fields from the input bfd's mach-o header to the output
1441 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1442 Redefine to bfd_mach_o_bfd_print_private_data.
1443 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1445 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1448 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1449 `.got.plt' entry referred is in range.
1450 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1451 start. Replace the assertion used for that with a proper error
1454 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1456 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1459 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1461 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1462 (INCLUDES): Rename to ...
1463 (AM_CPPFLAGS): ... this.
1464 * configure.ac: Remove AC_PREREQ.
1465 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1466 info-in-builddir no-texinfo.tex.
1467 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1468 * doc/bfd.texinfo: Rename to ...
1469 * doc/bfd.texi: ... this.
1470 * Makefile.in: Re-generate.
1471 * aclocal.m4: Re-generate.
1472 * config.in: Re-generate.
1473 * configure: Re-generate.
1474 * doc/Makefile.in: Re-generate.
1476 2018-06-18 Mephi <mephi42@gmail.com>
1479 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1480 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1481 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1482 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1483 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1484 * bfd-in2.h: Regenerate.
1485 * libbfd.h: Regenerate.
1487 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1489 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1491 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1494 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1495 symbol version is base version.
1497 2018-06-14 Alan Modra <amodra@gmail.com>
1499 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1500 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1501 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1502 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1503 "dynamic_relocs" is not set.
1504 * elfxx-mips.c (count_section_dynsyms): Likewise.
1506 2018-06-14 Alan Modra <amodra@gmail.com>
1509 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1511 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1512 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1514 * elfxx-mips.c (print_mips_ases): Add CRC.
1516 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1519 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1520 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1521 __bss_start, _end and _edata in shared libraries.
1523 2018-06-07 Alan Modra <amodra@gmail.com>
1525 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1526 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1528 2018-06-05 Alan Modra <amodra@gmail.com>
1530 * bfd.c (struct bfd): Update comment on "where" usage.
1531 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1532 "iostream", and "where" from containing archive file. Return
1533 error on NULL iovec.
1534 (bfd_bread): Similarly, and return error attempted out of
1535 bounds archive element access.
1536 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1537 "where" from containing archive file.
1538 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1539 attempt to optimize away seeks. Don't paper over errors by
1541 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1542 (bfd_get_size): Likewise.
1543 (bfd_mmap): Operate on and use iovec of containing archive
1544 file. Return error on NULL iovec.
1545 * cache.c (bfd_cache_lookup_worker): Abort if working on
1546 archive element bfd.
1547 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1548 Don't ignore zero byte reads.
1549 (cache_bread): Look up FILE* in cache here. Error on NULL
1551 (cache_bwrite): Rename "where" to "from".
1552 (cache_bmmap): Don't handle archive elements.
1553 * coffcode.h (coff_slurp_line_table): Exit early on zero
1555 * bfd-in2.h: Regenerate.
1557 2018-06-05 Alan Modra <amodra@gmail.com>
1560 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1561 nested archives. Open file again for plugin.
1562 (try_claim): Don't save and restore file position. Close file
1564 * sysdep.h (O_BINARY): Define.
1566 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1568 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1569 (compute_fill_extra_space): Drop declaration. Rename function to
1570 xtensa_compute_fill_extra_space.
1571 (compute_ebb_actions, remove_dead_literal): Update references to
1572 compute_fill_extra_space.
1574 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1576 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1578 (xtensa_add_names): New function.
1579 (xtensa_property_section_name): Add new parameter
1580 separate_sections, use it to choose property section name.
1581 (xtensa_get_separate_property_section): New function.
1582 (xtensa_get_property_section): Invoke
1583 xtensa_get_separate_property_section to get individual property
1584 section if it exists, common property section otherwise.
1585 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1586 to xtensa_property_section_name.
1588 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1591 * bfd-in.h: Include "diagnostics.h".
1592 * bfd-in2.h: Regenerated.
1593 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1594 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1595 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1596 -Wstringop-truncation.
1597 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1598 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1599 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1600 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1601 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1603 2018-06-03 Jim Wilson <jimw@sifive.com>
1606 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1607 for and handle an undefined weak with no PLT.
1610 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1611 to code that ignores duplicate symbols.
1613 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1615 * version.m4: Bump version to 2.30.52
1616 * configure: Regenerated.
1618 2018-06-01 Alan Modra <amodra@gmail.com>
1620 * bfd.c (_bfd_error_handler): Arrange for this function to be
1621 declared in bfd-in2.h.
1622 * libbfd-in.h (_bfd_error_handler): Don't declare.
1623 * libbfd.h: Regenerate.
1624 * bfd-in2.h: Regenerate.
1626 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1628 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1629 This is needed to generate UEFI application image files from ELFs.
1631 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1633 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1634 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1635 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1636 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1637 (elf_i386_lazy_ibt_plt): Likewise.
1638 (elf_i386_nacl_plt): Likewise.
1639 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1640 (elf_x86_64_tlsdesc_plt_entry): This.
1641 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1642 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1643 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1644 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1645 (elf_x86_64_lazy_bnd_plt): Likewise.
1646 (elf_x86_64_lazy_ibt_plt): Likewise.
1647 (elf_x32_lazy_ibt_plt): Likewise.
1648 (elf_x86_64_nacl_plt): Likewise.
1649 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1650 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1651 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1652 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1653 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1654 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1655 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1656 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1657 (elf_x86_non_lazy_plt_layout): Update comments.
1658 (elf_x86_plt_layout): Likewise.
1660 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1663 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1664 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1665 (elf_backend_add_symbol_hook): Likewise.
1666 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1667 (elf_backend_add_symbol_hook): Likewise.
1668 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1669 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1670 (elf_backend_add_symbol_hook): Likewise.
1671 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1672 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1673 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1674 (elf_backend_add_symbol_hook): Likewise.
1675 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1677 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1678 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1679 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1680 * elflink.c (elf_link_add_object_symbols): Set
1681 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1683 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1686 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1687 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1688 Extracted from _bfd_elf_link_assign_sym_version.
1689 (_bfd_elf_link_hide_sym_by_version): New function.
1690 (_bfd_elf_link_assign_sym_version): Use
1691 _bfd_elf_link_hide_versioned_symbol.
1692 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1693 _bfd_elf_link_hide_sym_by_version instead of
1694 bfd_hide_sym_by_version. Don't check unversioned symbol.
1696 2018-05-25 Alan Modra <amodra@gmail.com>
1698 * Makefile.in: Regenerate.
1699 * po/SRC-POTFILES.in: Regenerate.
1701 2018-05-25 Alan Modra <amodra@gmail.com>
1703 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1704 * configure: Regenerate.
1706 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1708 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1711 2018-05-22 Alan Modra <amodra@gmail.com>
1714 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1716 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1718 (final_link_relocate): Revert last change.
1720 2018-05-22 Alan Modra <amodra@gmail.com>
1723 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1724 stubs in non-alloc sections.
1726 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1729 * aout-target.h (MY_bfd_link_hide_symbol): New.
1730 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1731 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1732 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1733 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1734 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1735 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1736 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1737 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1738 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1739 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1740 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1741 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1742 (bfd_link_hide_symbol): Likewise.
1743 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1744 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1745 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1746 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1747 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1748 * som.c (som_bfd_link_hide_symbol): Likewise.
1749 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1750 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1751 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1752 (alpha_vms_bfd_link_hide_symbol): Likewise.
1753 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1754 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1755 _bfd_generic_link_hide_symbol.
1756 (rs6000_xcoff64_aix_vec): Likewise.
1757 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1758 local symbol dynamic.
1759 (_bfd_elf_link_hide_symbol): New function.
1760 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1761 check root.ldscript_def.
1762 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1763 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1764 * bfd-in2.h: Regenerated.
1765 * libbfd.h: Likewise.
1767 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1770 * elf.c (setup_group): Mark section in a section group with
1773 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1776 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1777 set eh->local_ref to 1 if a symbol is versioned and there is a
1780 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1782 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1785 2018-05-18 Jim Wilson <jimw@sifive.com>
1787 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1788 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1789 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1790 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1791 (riscv_elf_finish_dynamic_symbol): Likewise.
1793 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1795 * Makefile.am: Add s12z files.
1796 * Makefile.in: Regenerate.
1797 * archures.c: Add bfd_s12z_arch.
1798 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1799 * bfd-in2.h: Regenerate.
1800 * config.bfd: Add s12z target.
1801 * configure.ac: Add s12z target.
1802 * configure: Regenerate.
1803 * cpu-s12z.c: New file.
1804 * elf32-s12z.c: New file.
1805 * libbfd.c (bfd_putb24): New function.
1806 (bfd_putl24): New function.
1807 * libbfd.h: Regenerate.
1808 * reloc.c: Add s12z relocations.
1809 (bfd_get_reloc_size): Handle size 5 relocs.
1810 * targets.c: Add s12z_elf32_vec.
1812 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1815 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1817 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1818 set eh->local_ref to 1 for linker defined symbols.
1820 2018-05-18 Alan Modra <amodra@gmail.com>
1823 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1824 don't point at other SHT_GROUP sections. Set shdr corresponding
1825 to invalid entry, to NULL rather than section 0. Identify
1826 SHT_GROUP section index when reporting an error. Cope with NULL
1829 2018-05-18 Alan Modra <amodra@gmail.com>
1831 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1832 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1834 * libbfd.h: Regenerate.
1835 * configure: Regenerate.
1836 * config.in: Regenerate.
1838 2018-05-18 Alan Modra <amodra@gmail.com>
1840 * libbfd-in.h: Add include guard.
1841 * libcoff-in.h: Likewise.
1842 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1843 * doc/Makefile.in: Regenerate.
1844 * libbfd.h: Regenerate.
1845 * libcoff.h: Regenerate.
1847 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1849 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1851 2018-05-16 Alan Modra <amodra@gmail.com>
1854 * format.c (struct bfd_preserve): Add section_id.
1855 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1857 (bfd_reinit): Set _bfd_section_id.
1858 (bfd_check_format_matches): Put all matches of any priority into
1859 matching_vector. Save initial section id and start each attempted
1860 match at that section id.
1861 * libbfd-in.h (_bfd_section_id): Declare.
1862 * section.c (_bfd_section_id): Rename from section_id and make
1863 global. Adjust uses.
1864 (bfd_get_next_section_id): Delete.
1865 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1866 bfd_get_section_id with _bfd_section_id.
1867 * libbfd.h: Regenerate.
1868 * bfd-in2.h: Regenerate.
1870 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1872 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1873 of the aux structure are initialised.
1875 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1877 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1879 2018-05-15 Nick Clifton <nickc@redhat.com>
1881 * po/pt.po: New Portuguese translation.
1882 * configure.ac (ALL_LINGUAS): Add pt.
1883 * configure: Regenerate.
1885 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1888 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1889 an error on IFUNC pointer defined in PDE.
1890 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1891 _bfd_x86_elf_link_fixup_ifunc_symbol.
1892 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1893 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1895 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1897 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1900 * elfxx-x86.c (elf_x86_linker_defined): New function.
1901 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1902 _end and _edata locally defined within executables.
1904 2018-05-12 Alan Modra <amodra@gmail.com>
1907 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1908 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1909 Instead make matching_lma and suggested_lma pointers to the
1910 sections. Align section vma and lma calculated from segment.
1911 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1912 test. Try to handle alignment padding before first section by
1913 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1915 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1917 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1918 conformant to TI ABI.
1919 (pru_elf32_relax_section): Likewise.
1920 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1921 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1922 (pru_elf32_pmem_relocate): Trap - should not get here.
1923 (pru_elf32_relocate_section): Add support for REL relocations.
1924 (elf_info_to_howto_rel): Enable REL.
1925 (elf_backend_may_use_rel_p): Likewise.
1926 (elf_backend_may_use_rela_p): Likewise.
1927 (elf_backend_default_use_rela_p): Likewise.
1929 2018-05-09 Alan Modra <amodra@gmail.com>
1932 * peXXigen.c (pe_print_edata): Correct minimum size.
1934 2018-05-09 Alan Modra <amodra@gmail.com>
1937 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1939 2018-05-08 Nick Clifton <nickc@redhat.com>
1942 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1944 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1945 attribute section is larger than the size of the file.
1947 2018-05-07 Alan Modra <amodra@gmail.com>
1949 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1950 strncmp when checking for ".bf" special symbol.
1951 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1952 section name a char array, remove sentinal known_sections entry,
1953 and adjust loop over known_sections to suit. Use memcmp rather
1956 2018-05-04 Alan Modra <amodra@gmail.com>
1958 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1959 (struct elf_external_linux_prpsinfo32_ugid16),
1960 (struct elf_external_linux_prpsinfo64_ugid32),
1961 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1962 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1964 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1966 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1968 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1969 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1970 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1971 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1972 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1974 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1975 false positive gcc-8 warning.
1976 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1978 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1980 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1981 of arguments when warning about different long double types.
1983 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1985 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1986 (elf_backend_fixup_symbol): New macro.
1987 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1989 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1991 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1993 * Makefile.am: Added NFP files to build.
1994 * archures.c: Added bfd_arch_nfp
1995 * config.bfd: Added NFP support.
1996 * configure.ac: Added NFP support.
1997 * cpu-nfp.c: New, for NFP support.
1998 * elf-bfd.h: Added elf_section_info()
1999 * elf64-nfp.c: New, for NFP support.
2000 * po/SRC-POTFILES.in: Added NFP source files.
2001 * targets.c: Added nfp_elf64_vec
2002 * bfd-in2.h: Regenerate.
2003 * Makefile.in: Regenerate.
2004 * configure: Regenerate.
2006 2018-04-27 Alan Modra <amodra@gmail.com>
2008 * bfd-in2.h: Regenerate.
2009 * libbfd.h: Regenerate.
2011 2018-04-27 Alan Modra <amodra@gmail.com>
2015 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
2017 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
2019 2018-04-26 Pedro Alves <palves@redhat.com>
2021 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
2022 ifunc and non-ifunc symbols duplicates.
2024 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2025 Mickaël Guêné <mickael.guene@st.com>
2027 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
2028 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
2029 (elf32_arm_populate_plt_entry): Likewise.
2030 (elf32_arm_output_plt_map_1): Likewise.
2031 (elf32_arm_output_arch_local_syms): Likewise.
2033 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2034 Mickaël Guêné <mickael.guene@st.com>
2036 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
2037 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
2039 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2040 Mickaël Guêné <mickael.guene@st.com>
2042 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
2045 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2046 Mickaël Guêné <mickael.guene@st.com>
2048 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
2049 (elf32_arm_always_size_sections): Create stack segment.
2051 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2052 Mickaël Guêné <mickael.guene@st.com>
2054 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
2055 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
2057 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
2058 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
2059 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
2060 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
2061 (struct elf32_arm_link_hash_table): Update comment.
2062 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
2063 (IS_ARM_TLS_RELOC): Likewise.
2064 (elf32_arm_check_relocs): Likewise.
2065 (allocate_dynrelocs_for_symbol): Likewise.
2066 (elf32_arm_size_dynamic_sections): Update comment.
2067 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
2068 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
2070 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2071 Mickaël Guêné <mickael.guene@st.com>
2073 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
2074 (elf32_arm_create_dynamic_sections): Handle FDPIC.
2075 (elf32_arm_allocate_plt_entry): Likewise.
2076 (elf32_arm_populate_plt_entry): Likewise.
2077 (elf32_arm_output_plt_map_1): Likewise.
2079 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2080 Mickaël Guêné <mickael.guene@st.com>
2082 * elf32-arm.c (struct fdpic_local): New.
2083 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
2084 (elf32_arm_local_fdpic_cnts): New.
2085 (struct fdpic_global): New.
2086 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
2087 (elf32_arm_link_hash_table): Add srofixup field.
2088 (arm_elf_add_rofixup): New.
2089 (arm_elf_fill_funcdesc): New.
2090 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
2091 (elf32_arm_allocate_local_sym_info): Likewise.
2092 (create_got_section): Create .rofixup section.
2093 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
2094 (bfd_elf32_arm_set_target_params): Handle FDPIC.
2095 (elf32_arm_final_link_relocate): Likewise.
2096 (elf32_arm_check_relocs): Likewise.
2097 (allocate_dynrelocs_for_symbol): Likewise.
2098 (elf32_arm_size_dynamic_sections): Likewise.
2099 (elf32_arm_finish_dynamic_sections): Likewise.
2100 (elf32_arm_output_arch_local_syms): Likewise.
2101 (elf32_arm_fdpic_omit_section_dynsym): New.
2103 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2104 Mickaël Guêné <mickael.guene@st.com>
2106 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
2107 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
2108 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
2109 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
2110 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
2111 (elf32_arm_howto_from_type): Take new members of
2112 elf32_arm_howto_table_2 into account.
2113 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
2114 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
2115 BFD_RELOC_ARM_FUNCDESC_VALUE.
2116 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
2117 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
2118 BFD_RELOC_ARM_FUNCDESC_VALUE.
2120 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2121 Mickaël Guêné <mickael.guene@st.com>
2123 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
2124 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
2125 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
2126 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
2128 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2129 Mickaël Guêné <mickael.guene@st.com>
2131 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
2132 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
2133 arm*-*-uclinuxfdpiceabi.
2134 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
2135 arm_elf32_fdpic_le_vec.
2136 * configure: Regenerate.
2137 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
2138 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
2139 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
2140 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
2141 (elf32_arm_fdpic_link_hash_table_create): New.
2142 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
2143 arm_elf32_fdpic_le_vec.
2145 2018-04-25 Alan Modra <amodra@gmail.com>
2147 * elf-linux-core.h: Disable gcc-8 string truncation warning.
2148 * elf.c (elfcore_write_prpsinfo): Likewise.
2150 2018-04-25 Alan Modra <amodra@gmail.com>
2152 * Makefile.am: Remove arm-aout and arm-coff support.
2153 * config.bfd: Likewise.
2154 * configure.ac: Likewise.
2155 * targets.c: Likewise.
2156 * aout-arm.c: Delete.
2157 * armnetbsd.c: Delete.
2159 * Makefile.in: Regenerate.
2160 * configure: Regenerate.
2161 * po/SRC-POTFILES.in: Regenerate.
2163 2018-04-24 Nick Clifton <nickc@redhat.com>
2166 * elf.c (ignore_section_sym): Check for the output_section pointer
2167 being NULL before dereferencing it.
2170 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
2171 a negative PE_DEBUG_DATA size before iterating over the debug data.
2173 2018-04-23 Alan Modra <amodra@gmail.com>
2175 * elf-linux-core.h: Revert last change.
2178 2018-04-23 Nick Clifton <nickc@redhat.com>
2181 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2182 the end of the string table, and zero it.
2184 2018-04-23 Alan Modra <amodra@gmail.com>
2186 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
2187 gcc-8 string truncation warning.
2188 (swap_linux_prpsinfo32_ugid16_out): Likewise.
2189 (swap_linux_prpsinfo64_ugid32_out): Likewise.
2190 (swap_linux_prpsinfo64_ugid16_out): Likewise.
2191 * elf.c (elfcore_write_prpsinfo): Likewise.
2193 2018-04-23 Nick Clifton <nickc@redhat.com>
2196 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2197 the end of the string table, and zero it.
2199 2018-04-20 Alan Modra <amodra@gmail.com>
2202 * elf32-hppa.c (got_relocs_needed): Add extra param to special
2203 case both dtprel and tprel relocs.
2204 (allocate_dynrelocs): Adjust conditions for got relocs.
2205 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
2206 Emit dynamic relocs on TLS GOT entries for shared libraries,
2207 not when pic. Omit dynamic reloc on dtprel entry when local,
2208 and on tprel entry when local and executable.
2210 2018-04-19 Alan Modra <amodra@gmail.com>
2213 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
2214 (hppa_type_of_stub): Don't return a long branch stub for
2215 symbols other than those defined statically.
2217 2018-04-19 Alan Modra <amodra@gmail.com>
2219 * Makefile.am: Revert 2018-04-18 coff-mips changes.
2220 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
2221 to selvecs for mips targets change 2018-04-18.
2222 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
2223 and mips_ecoff_bele_vec.
2224 * targets.c: Likewise.
2225 * coff-mips.c: Resurrect.
2226 * Makefile.in: Regenerate.
2227 * configure: Regenerate.
2228 * po/SRC-POTFILES.in: Regenerate.
2230 2018-04-18 Alan Modra <amodra@gmail.com>
2232 * Makefile.am: Remove mips aout and coff support.
2233 * config.bfd: Likewise.
2234 * configure.ac: Likewise.
2235 * targets.c: Likewise.
2236 * coff-mips.c: Delete
2239 * pei-mips.c: Delete
2240 * Makefile.in: Regenerate.
2241 * configure: Regenerate.
2242 * po/SRC-POTFILES.in: Regenerate.
2244 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2246 * elf32-i386.c (elf32_bed): Define before including
2248 * elf64-x86-64.c (elf64_bed): Define before including
2250 (elf32_bed): Define before including "elf32-target.h".
2252 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2255 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
2256 normal input file with compatible relocation.
2258 2018-04-18 Alan Modra <amodra@gmail.com>
2260 * Makefile.am: Remove support for assorted i386 aout and coff targets.
2261 * config.bfd: Likewise.
2262 * configure.ac: Likewise.
2263 * doc/bfdint.texi: Likewise.
2264 * targets.c: Likewise.
2265 * freebsd.h: Delete.
2266 * i386dynix.c: Delete.
2267 * i386freebsd.c: Delete.
2268 * i386linux.c: Delete.
2269 * i386mach3.c: Delete.
2270 * i386netbsd.c: Delete.
2271 * i386os9k.c: Delete.
2272 * Makefile.in: Regenerate.
2273 * configure: Regenerate.
2274 * po/SRC-POTFILES.in: Regenerate.
2276 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
2278 Microblaze Target: PIC data text relative
2280 * bfd/reloc.c (2 new BFD relocations):
2281 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
2282 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
2283 * bfd/bfd-in2.h: Regenerate
2284 * bfd/libbfd.h: Regenerate
2285 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
2286 new relocs and handle them in both relocate and relax functions.
2287 (microblaze_elf_reloc_type_lookup): add mapping between for new
2289 (microblaze_elf_relocate_section): Handle new relocs in case of
2291 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
2293 2018-04-17 Nick Clifton <nickc@redhat.com>
2296 * aoutx.h (find_nearest_line): Check that the symbol name exists
2297 and is long enough, before attempting to see if it is for a .o
2299 * hash.c (bfd_hash_hash): Add an assertion that the string is not
2301 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
2303 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
2307 * dwarf2.c (concat_filename): Check for a NULL table pointer.
2309 2018-04-16 Nick Clifton <nickc@redhat.com>
2312 * coffgen.c (coff_pointerize_aux): Check for an out of range
2315 2018-04-16 Alan Modra <amodra@gmail.com>
2317 * Makefile.am: Remove arm-epoc-pe support.
2318 * coff-arm.c: Likewise.
2319 * config.bfd: Likewise.
2320 * configure.ac: Likewise.
2321 * targets.c: Likewise.
2322 * epoc-pe-arm.c: Delete.
2323 * epoc-pei-arm.c: Delete.
2324 * Makefile.in: Regenerate.
2325 * configure: Regenerate.
2326 * po/SRC-POTFILES.in: Regenerate.
2328 2018-04-16 Alan Modra <amodra@gmail.com>
2330 * Makefile.am: Remove sparc-aout and sparc-coff support.
2331 * config.bfd: Likewise.
2332 * configure.ac: Likewise.
2333 * targets.c: Likewise.
2334 * aout-sparcle.c: Delete.
2336 * cf-sparclynx.c: Delete.
2337 * coff-sparc.c: Delete.
2339 * sparclinux.c: Delete.
2340 * sparclynx.c: Delete.
2341 * sparcnetbsd.c: Delete.
2343 * Makefile.in: Regenerate.
2344 * configure: Regenerate.
2345 * po/SRC-POTFILES.in: Regenerate.
2347 2018-04-16 Alan Modra <amodra@gmail.com>
2349 * Makefile.am: Remove m68k-aout and m68k-coff support.
2350 * aoutf1.h: Likewise.
2351 * aoutx.h: Likewise.
2352 * archive.c: Likewise.
2353 * bfd-in.h: Likewise.
2355 * coffcode.h: Likewise.
2356 * coffswap.h: Likewise.
2357 * config.bfd: Likewise.
2358 * configure.ac: Likewise.
2359 * configure.host: Likewise.
2360 * doc/bfd.texinfo: Likewise.
2361 * doc/bfdint.texi: Likewise.
2362 * freebsd.h: Likewise.
2363 * gen-aout.c: Likewise.
2364 * hpux-core.c: Likewise.
2365 * libaout.h: Likewise.
2366 * libbfd-in.h: Likewise.
2367 * pdp11.c: Likewise.
2368 * peicode.h: Likewise.
2369 * riscix.c: Likewise.
2370 * targets.c: Likewise.
2372 * coff-apollo.c: Delete.
2373 * coff-aux.c: Delete.
2374 * coff-m68k.c: Delete.
2375 * coff-svm68k.c: Delete.
2376 * coff-u68k.c: Delete.
2377 * hosts/delta68.h: Delete.
2378 * hosts/hp300bsd.h: Delete.
2379 * hosts/m68kaux.h: Delete.
2380 * hosts/news.h: Delete.
2381 * hp300bsd.c: Delete.
2382 * hp300hpux.c: Delete.
2383 * liboasys.h: Delete.
2384 * m68k4knetbsd.c: Delete.
2385 * m68klinux.c: Delete.
2386 * m68knetbsd.c: Delete.
2388 * versados.c: Delete.
2389 * Makefile.in: Regenerate.
2390 * bfd-in2.h: Regenerate.
2391 * configure: Regenerate.
2392 * libbfd.h: Regenerate.
2393 * po/SRC-POTFILES.in: Regenerate.
2395 2018-04-16 Alan Modra <amodra@gmail.com>
2397 * Makefile.am: Remove sh5 and sh64 support.
2398 * archures.c: Likewise.
2399 * config.bfd: Likewise.
2400 * configure.ac: Likewise.
2401 * cpu-sh.c: Likewise.
2402 * elf32-sh-relocs.h: Likewise.
2403 * elf32-sh.c: Likewise.
2404 * targets.c: Likewise.
2405 * elf32-sh64-com.c: Delete.
2406 * elf32-sh64.c: Delete.
2407 * elf32-sh64.h: Delete.
2408 * elf64-sh64.c: Delete.
2409 * Makefile.in: Regenerate.
2410 * bfd-in2.h: Regenerate.
2411 * configure: Regenerate.
2412 * po/SRC-POTFILES.in: Regenerate.
2414 2018-04-16 Alan Modra <amodra@gmail.com>
2416 * Makefile.am: Remove sh-symbianelf support.
2417 * config.bfd: Likewise.
2418 * configure.ac: Likewise.
2419 * targets.c: Likewise.
2420 * elf32-sh-symbian.c: Delete.
2421 * Makefile.in: Regenerate.
2422 * configure: Regenerate.
2423 * po/SRC-POTFILES.in: Regenerate.
2425 2018-04-16 Alan Modra <amodra@gmail.com>
2427 * Makefile.am: Remove vax-bsd and vax-ultrix support.
2428 * config.bfd: Likewise.
2429 * configure.ac: Likewise.
2430 * targets.c: Likewise.
2432 * Makefile.in: Regenerate.
2433 * configure: Regenerate.
2434 * po/SRC-POTFILES.in: Regenerate.
2436 2018-04-16 Alan Modra <amodra@gmail.com>
2438 * Makefile.am: Remove w65 support.
2439 * archures.c: Likewise.
2440 * coffcode.h: Likewise.
2441 * config.bfd: Likewise.
2442 * configure.ac: Likewise.
2443 * targets.c: Likewise.
2444 * coff-w65.c: Delete.
2445 * cpu-w65.c: Delete.
2446 * Makefile.in: Regenerate.
2447 * bfd-in2.h: Regenerate.
2448 * configure: Regenerate.
2449 * po/SRC-POTFILES.in: Regenerate.
2451 2018-04-16 Alan Modra <amodra@gmail.com>
2453 * Makefile.am: Remove we32k support.
2454 * archures.c: Likewise.
2455 * coffcode.h: Likewise.
2456 * config.bfd: Likewise.
2457 * configure.ac: Likewise.
2458 * targets.c: Likewise.
2459 * coff-we32k.c: Delete.
2460 * cpu-we32k.c: Delete.
2461 * Makefile.in: Regenerate.
2462 * bfd-in2.h: Regenerate.
2463 * configure: Regenerate.
2464 * po/SRC-POTFILES.in: Regenerate.
2466 2018-04-16 Alan Modra <amodra@gmail.com>
2468 * Makefile.am: Remove m88k support.
2469 * aoutx.h: Likewise.
2470 * archures.c: Likewise.
2471 * coffcode.h: Likewise.
2472 * coffswap.h: Likewise.
2473 * config.bfd: Likewise.
2474 * configure.ac: Likewise.
2475 * cpu-ns32k.c: Likewise.
2476 * elf32-nds32.c: Likewise.
2477 * mach-o.c: Likewise.
2478 * netbsd-core.c: Likewise.
2479 * reloc.c: Likewise.
2480 * targets.c: Likewise.
2481 * coff-m88k.c: Delete.
2482 * cpu-m88k.c: Delete.
2483 * elf32-m88k.c: Delete.
2484 * hosts/m88kmach3.h: Delete.
2485 * m88kmach3.c: Delete.
2486 * m88kopenbsd.c: Delete.
2487 * Makefile.in: Regenerate.
2488 * bfd-in2.h: Regenerate.
2489 * configure: Regenerate.
2490 * po/SRC-POTFILES.in: Regenerate.
2492 2018-04-16 Alan Modra <amodra@gmail.com>
2494 * Makefile.am: Remove i370 support.
2495 * archures.c: Likewise.
2496 * config.bfd: Likewise.
2497 * configure.ac: Likewise.
2498 * targets.c: Likewise.
2499 * cpu-i370.c: Delete.
2500 * elf32-i370.c: Delete.
2501 * Makefile.in: Regenerate.
2502 * bfd-in2.h: Regenerate.
2503 * configure: Regenerate.
2504 * po/SRC-POTFILES.in: Regenerate.
2506 2018-04-16 Alan Modra <amodra@gmail.com>
2508 * Makefile.am: Remove h8500 support.
2509 * archures.c: Likewise.
2510 * coffcode.h: Likewise.
2511 * config.bfd: Likewise.
2512 * configure.ac: Likewise.
2513 * targets.c: Likewise.
2514 * coff-h8500.c: Delete.
2515 * cpu-h8500.c: Delete.
2516 * Makefile.in: Regenerate.
2517 * bfd-in2.h: Regenerate.
2518 * configure: Regenerate.
2519 * po/SRC-POTFILES.in: Regenerate.
2521 2018-04-16 Alan Modra <amodra@gmail.com>
2523 * Makefile.am: Remove h8300-coff support.
2524 * coffcode.h: Likewise.
2525 * config.bfd: Likewise.
2526 * configure.ac: Likewise.
2527 * reloc16.c: Likewise.
2528 * targets.c: Likewise.
2529 * coff-h8300.c: Delete.
2530 * Makefile.in: Regenerate.
2531 * configure: Regenerate.
2532 * po/SRC-POTFILES.in: Regenerate.
2534 2018-04-16 Alan Modra <amodra@gmail.com>
2536 * Makefile.am: Remove IEEE 695 support.
2537 * archures.c: Likewise.
2539 * config.bfd: Likewise.
2540 * configure.ac: Likewise.
2541 * doc/bfd.texinfo: Likewise.
2542 * doc/bfdint.texi: Likewise.
2543 * doc/bfdsumm.texi: Likewise.
2544 * section.c: Likewise.
2545 * targets.c: Likewise.
2547 * libieee.h: Delete.
2548 * Makefile.in: Regenerate.
2549 * bfd-in2.h: Regenerate.
2550 * configure: Regenerate.
2551 * po/SRC-POTFILES.in: Regenerate.
2553 2018-04-16 Alan Modra <amodra@gmail.com>
2555 * config.bfd: Remove tandem support.
2557 2018-04-16 Alan Modra <amodra@gmail.com>
2559 * Makefile.am: Remove newsos3 support.
2560 * aoutx.h: Likewise.
2561 * config.bfd: Likewise.
2562 * configure.ac: Likewise.
2563 * targets.c: Likewise.
2564 * newsos3.c: Delete.
2565 * Makefile.in: Regenerate.
2566 * configure: Regenerate.
2567 * po/SRC-POTFILES.in: Regenerate.
2569 2018-04-16 Alan Modra <amodra@gmail.com>
2571 * Makefile.am: Remove netware support.
2572 * bfd-in.h: Likewise.
2574 * config.bfd: Likewise.
2575 * configure.ac: Likewise.
2576 * doc/bfdint.texi: Likewise.
2577 * ecoff.c: Likewise.
2578 * targets.c: Likewise.
2580 * nlm-target.h: Delete.
2582 * nlm32-alpha.c: Delete.
2583 * nlm32-i386.c: Delete.
2584 * nlm32-ppc.c: Delete.
2585 * nlm32-sparc.c: Delete.
2588 * nlmcode.h: Delete.
2589 * nlmswap.h: Delete.
2590 * Makefile.in: Regenerate.
2591 * bfd-in2.h: Regenerate.
2592 * configure: Regenerate.
2593 * po/SRC-POTFILES.in: Regenerate.
2595 2018-04-16 Alan Modra <amodra@gmail.com>
2597 * archures.c: Remove tahoe support.
2598 * config.bfd: Likewise.
2599 * configure.ac: Likewise.
2600 * hosts/tahoe.h: Delete.
2601 * bfd-in2.h: Regenerate.
2602 * configure: Regenerate.
2604 2018-04-14 Alan Modra <amodra@gmail.com>
2606 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2607 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2609 (elfNN_bed): Init relropagesize.
2610 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2611 select relropagesize.
2612 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2613 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2614 (ELF_MINPAGESIZE): Don't define.
2615 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2616 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2617 * bfd-in2.h: Regenerate.
2619 2018-04-14 Alan Modra <amodra@gmail.com>
2621 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2622 on __QNXTARGET__ define.
2624 2018-04-14 Alan Modra <amodra@gmail.com>
2626 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2629 2018-04-11 Alan Modra <amodra@gmail.com>
2631 * aout-adobe.c: Delete.
2633 * coff-i860.c: Delete.
2634 * coff-i960.c: Delete.
2635 * cpu-i860.c: Delete.
2636 * cpu-i960.c: Delete.
2637 * elf32-i860.c: Delete.
2638 * elf32-i960.c: Delete.
2639 * hosts/i860mach3.h: Delete.
2640 * Makefile.am: Remove i860, i960, bout, and adobe support.
2641 * archures.c: Remove i860 and i960 support.
2642 * coffcode.h: Likewise.
2643 * reloc.c: Likewise.
2644 * aoutx.h: Comment updates.
2645 * archive.c: Remove BOUT and i960 support.
2646 * bfd.c: Remove BOUT support.
2647 * coffswap.h: Remove i960 support.
2648 * config.bfd: Remove i860, i960 and adobe targets.
2649 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2650 * targets.c: Likewise.
2651 * ieee.c: Remove i960 support.
2652 * mach-o.c: Remove i860 support.
2653 * Makefile.in: Regenerate.
2654 * bfd-in2.h: Regenerate.
2655 * configure: Regenerate.
2656 * libbfd.h: Regenerate.
2657 * po/SRC-POTFILES.in: Regenerate.
2659 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2661 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2662 in the BFD symbol referred by the relocation.
2663 (mips_elf64_write_rela): Likewise.
2665 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2667 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2668 error for out-of-range `r_sym' values.
2670 2018-04-09 Alan Modra <amodra@gmail.com>
2672 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2673 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2674 (ppc64_elf_check_relocs): Set has_pltcall.
2675 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2676 (ppc64_elf_inline_plt): New function.
2677 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2678 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2679 * elf32-ppc.c (has_pltcall): Define.
2680 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2681 (ppc_elf_check_relocs): Set has_pltcall.
2682 (ppc_elf_inline_plt): New function.
2683 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2684 (ppc_elf_size_dynamic_sections): Likewise.
2685 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2687 2018-04-09 Alan Modra <amodra@gmail.com>
2689 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2690 (is_plt_seq_reloc): New function.
2691 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2692 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2693 (ppc_elf_relax_section): Handle PLTCALL reloc.
2694 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2696 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2697 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2698 (has_tls_get_addr_call): Correct comment.
2699 (is_branch_reloc): Add PLTCALL.
2700 (is_plt_seq_reloc): New function.
2701 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2702 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2703 entry for R_PPC64_PLTCALL.
2704 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2705 (ppc_type_of_stub): Handle PLTCALL reloc.
2706 (toc_adjusting_stub_needed): Likewise.
2707 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2708 reloc insn. Nop out inline plt call sequence when resolving
2709 locally. Handle __tls_get_addr inline plt call optimization.
2711 2018-04-09 Alan Modra <amodra@gmail.com>
2713 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2714 (struct ppc_stub_hash_entry): Add symtype field.
2716 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2717 (create_linkage_sections): Create pltlocal and relpltlocal.
2718 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2720 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2721 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2722 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2723 Keep PLT entries for inline calls against locals.
2724 (ppc_build_one_stub): Use pltlocal as appropriate.
2725 (ppc_size_one_stub): Likewise.
2726 (ppc64_elf_size_stubs): Set symtype.
2727 (build_global_entry_stubs_and_plt): Init pltlocal and write
2728 relpltlocal for globals.
2729 (write_plt_relocs_for_local_syms): Likewise for local syms.
2730 (ppc64_elf_relocate_section): Support PLT for local syms.
2731 * elf32-ppc.c (PLT_KEEP): Define.
2732 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2733 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2734 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2735 Set PLT_KEEP. Adjust update_local_sym_info call.
2736 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2737 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2738 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2739 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2740 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2741 (ppc_finish_symbols): Likewise for locals.
2743 2018-04-09 Alan Modra <amodra@gmail.com>
2745 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2746 for local symbols to..
2747 (write_plt_relocs_for_local_syms): ..here. New function.
2748 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2750 (build_global_entry_stubs_and_plt): ..here. Rename from
2751 build_global_entry_stubs.
2752 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2753 Call write_plt_relocs_for_local_syms.
2754 * elf32-ppc.c (get_sym_h): New function.
2755 (ppc_elf_relax_section): Use get_sym_h.
2756 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2757 stubs for local symbols to..
2758 (ppc_finish_symbols): ..here. New function.
2759 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2761 (write_global_sym_plt): ..here. New function.
2762 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2763 (ppc_finish_symbols): Declare.
2765 2018-04-09 Alan Modra <amodra@gmail.com>
2767 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2768 (ppc_elf_relocate_section): Likewise.
2769 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2770 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2771 resolution to plt entry relative to toc pointer.
2773 2018-04-09 Alan Modra <amodra@gmail.com>
2775 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2776 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2777 file when other TLS flags are tested in a mask.
2778 (TLS_MARK, NON_GOT): Define.
2779 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2780 (update_local_sym_info): Don't create got entry when NON_GOT.
2781 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2783 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2784 (ppc64_elf_relocate_section): Likewise.
2785 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2786 __tls_get_addr calls lacking a marker reloc.
2787 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2788 TLS_TPRELGD): Renumber. Update comment.
2789 (TLS_MARK, NON_GOT): Define.
2790 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2791 (update_local_sym_info): Don't create got entry when NON_GOT.
2792 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2794 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2795 __tls_get_addr calls lacking a marker reloc.
2797 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2799 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2800 R_X86_64_converted_reloc_bit.
2802 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2805 * configure: Regenerated.
2807 2018-04-05 Alan Modra <amodra@gmail.com>
2809 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2810 (elf_hppa_info_to_howto_rel): Likewise.
2812 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2814 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2815 unsuccessfully for unimplemented relocations.
2816 (elf_hppa_info_to_howto_rel): Likewise.
2818 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2820 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2821 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2822 howto lookup failure.
2823 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2825 (elf32_i860_info_to_howto_rela): Likewise.
2826 (elf32_i860_relocate_splitn): Likewise.
2827 (elf32_i860_relocate_pc16): Likewise.
2828 (elf32_i860_relocate_pc26): Likewise.
2829 (elf32_i860_relocate_section): Likewise.
2831 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2833 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2834 check for `visium_elf_howto_table' table access.
2836 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2838 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2839 check for `iq2000_elf_howto_table' table access.
2841 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2843 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2844 for `elf32_frv_howto_table' table access.
2846 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2848 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2849 unsuccessfully for placeholder howtos.
2850 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2851 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2853 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2855 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2856 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2858 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2860 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2861 ATTRIBUTE_UNUSED from `abfd'.
2863 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2865 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2866 `_bfd_error_handler' call formatting.
2868 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2870 * elf32-mips.c (mips_info_to_howto_rel): Call
2871 `mips_elf32_rtype_to_howto' directly rather than via
2872 `->elf_backend_mips_rtype_to_howto'.
2874 2018-03-28 Renlin Li <renlin.li@arm.com>
2877 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2878 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2879 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2880 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2881 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2882 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2883 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2884 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2885 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2886 (elfNN_aarch64_final_link_relocate): Support new relocations.
2887 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2889 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2891 2018-03-28 Renlin Li <renlin.li@arm.com>
2894 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2895 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2896 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2897 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2898 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2899 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2900 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2901 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2902 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2903 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2904 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2905 TLSLE_LDST16_TPREL_LO12,
2906 TLSLE_LDST16_TPREL_LO12_NC,
2907 TLSLE_LDST32_TPREL_LO12,
2908 TLSLE_LDST32_TPREL_LO12_NC,
2909 TLSLE_LDST64_TPREL_LO12,
2910 TLSLE_LDST64_TPREL_LO12_NC,
2911 TLSLE_LDST8_TPREL_LO12,
2912 TLSLE_LDST8_TPREL_LO12_NC.
2913 * bfd-in2.h: Regenerated.
2914 * libbfd.h: Regenerated.
2916 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2919 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2920 has_old_style_got_reloc.
2921 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2922 relocations. Fix a couple of long lines.
2923 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2924 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2927 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2930 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2931 ENDBR64 to the TLSDESC PLT entry.
2933 2018-03-21 Alan Modra <amodra@gmail.com>
2935 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2936 symbols. Use size_t counts. Delete redundant opd test.
2938 2018-03-21 Alan Modra <amodra@gmail.com>
2940 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2942 2018-03-21 Alan Modra <amodra@gmail.com>
2944 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2946 (update_local_sym_info): Likewise for local_got_tls_masks.
2947 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2949 2018-03-21 Alan Modra <amodra@gmail.com>
2951 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2952 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2953 do in size_dynamic_sections.
2955 2018-03-21 Alan Modra <amodra@gmail.com>
2957 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2958 without first checking array bounds.
2959 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2961 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2964 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2965 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2967 2018-03-19 Nick Clifton <nickc@redhat.com>
2969 * po/es.po: Updated Spanish translation.
2971 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2973 * elf32-xtensa.c (xlate_map_entry): Change types of address
2974 fields from 'unsigned' to 'bfd_vma'.
2975 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2976 the key argument to bsearch. Allow offsets past the end of a
2977 section, use the last map entry for translation of such offsets.
2979 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2981 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2982 Not support the target feature.
2983 (nds32_elf_ex9_itb_base): Likewise.
2984 (nds32_elf_ex9_import_table): Likewise.
2985 (nds32_elf_ex9_finish): Likewise.
2986 (nds32_elf_ex9_reloc_jmp): Likewise.
2987 (nds32_elf_get_insn_with_reg): Likewise.
2988 (nds32_get_local_syms): Likewise.
2989 (nds32_elf_ex9_replace_instruction): Likewise.
2990 (nds32_elf_ifc_calc): Likewise.
2991 (nds32_elf_ifc_finish): Likewise.
2992 (nds32_elf_ifc_replace): Likewise.
2993 (nds32_elf_ifc_reloc): Likewise.
2995 2018-03-14 Alan Modra <amodra@gmail.com>
2997 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2998 sfpr size added before defining alias symbols.
2999 (ppc64_elf_build_stubs): Add stub section padding before
3000 copying sfpr contents and defining save/restore alias symbols.
3002 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
3005 * elflink.c (elf_gc_mark_debug_section): Also check the local
3006 debug definition section.
3008 2018-03-13 Nick Clifton <nickc@redhat.com>
3011 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
3012 function. Add an end address parameter. Check access of the data
3013 pointer to make sure that they do not extend beyond the end
3014 address. Return FALSE if any check fails. Add the end address
3015 pointer to the ui structure.
3016 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
3017 codes to make sure that they do not extend beyond the end address
3018 pointer. Print an error message and return immediately if any
3021 2018-03-09 Nick Clifton <nickc@redhat.com>
3023 * elf64-s390.c (elf_s390_relocate_section): Move check for
3024 relocations against non-allocated sections to before the code that
3025 handles ifunc relocations.
3026 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3027 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
3028 relocs against IFUNC symbols in non-allocated sections as relocs
3029 against FUNC symbols.
3030 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
3032 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
3035 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
3036 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
3037 relocation against FUNC symbol.
3038 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3040 2018-03-07 Renlin Li <renlin.li@arm.com>
3043 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
3044 symbol, and don't emit relocation in specific case.
3046 2018-03-07 Alan Modra <amodra@gmail.com>
3048 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
3049 (mips_elf64_slurp_one_reloc_table): Pass on error.
3051 2018-03-03 James Cowgill <james.cowgill@mips.com>
3052 Maciej W. Rozycki <macro@mips.com>
3055 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
3056 after calling `undefined_symbol' hook if this is an error
3057 condition. Assume the value of 0 for the symbol requested
3060 2018-03-02 Jim Wilson <jimw@sifive.com>
3063 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
3064 and nop instead of 4.
3065 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
3068 2018-03-01 Jim Wilson <jimw@sifive.com>
3071 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
3072 else if instead of if.
3074 2018-03-01 Alan Modra <amodra@gmail.com>
3076 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
3078 2018-02-28 Alan Modra <amodra@gmail.com>
3081 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
3083 2018-02-28 Nick Clifton <nickc@redhat.com>
3087 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
3088 pointer. Drop unused abfd parameter. Check the size of the block
3089 before initialising the data field. Return the end pointer if the
3091 (read_attribute_value): Adjust invocations of read_n_bytes.
3094 * dwarf1.c (parse_die): Check the length of form blocks before
3095 advancing the data pointer.
3097 2018-02-28 Alan Modra <amodra@gmail.com>
3100 * aoutx.h (translate_symbol_table): Print an error message and set
3101 bfd_error on finding an invalid name string offset.
3103 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
3105 * config.in: Regenerated.
3106 * configure: Likewise.
3107 * configure.ac: Add --enable-separate-code.
3108 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
3109 to 1 for Linux/x86 targets,
3110 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
3111 DEFAULT_LD_Z_SEPARATE_CODE is 1.
3113 2018-02-27 Nick Clifton <nickc@redhat.com>
3115 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
3117 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
3118 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
3119 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
3120 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
3121 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
3122 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
3123 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
3124 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
3125 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3128 * elf-bfd.h (struct elf_backend_data): Change the return type of
3129 the elf_info_to_howto and elf_info_to_howto_rel function pointers
3131 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
3132 value from the info_to_howto function and fail if that function
3134 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
3135 from the info_to_howto function.
3136 (elf32_h8_relax_section): Likewise.
3137 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
3138 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3139 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
3140 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3141 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3142 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
3143 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
3144 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3145 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
3146 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
3147 (riscv_elf_relocate_section): Likewise.
3148 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
3149 bfd_boolean. Issue an error message, set an error value and
3150 return FALSE if the reloc is not recognized.
3151 (elf_hppa_info_to_howto_rel): Likewise.
3152 * elf-m10200.c (mn10200_info_to_howto): Likewise.
3153 * elf-m10300.c (mn10300_info_to_howto): Likewise.
3154 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
3155 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3156 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
3157 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3158 * elf32-bfin.c (bfin_info_to_howto): Likewise.
3159 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3160 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
3161 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
3162 (cris_info_to_howto_rela): Likewise.
3163 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3164 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3165 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
3167 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
3168 (elf32_dlx_info_to_howto_rel): Likewise.
3169 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3170 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3171 * elf32-frv.c (frv_info_to_howto_rela)
3172 (frvfdpic_info_to_howto_rel): Likewise.
3173 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
3174 * elf32-gen.c (elf_generic_info_to_howto)
3175 (elf_generic_info_to_howto_rel): Likewise.
3176 * elf32-h8300.c (elf32_h8_info_to_howto)
3177 (elf32_h8_info_to_howto_rel): Likewise.
3178 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3179 * elf32-i386.c (elf_i386_reloc_type_lookup)
3180 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
3181 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
3183 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3184 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3185 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3186 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3187 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3188 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
3190 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3191 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3192 * elf32-m68k.c (rtype_to_howto): Likewise.
3193 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3194 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3195 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3196 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3197 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3199 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3200 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3201 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3202 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
3204 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
3205 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3206 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3207 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3208 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
3209 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3210 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3211 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
3212 * elf32-score.c (s3_bfd_score_info_to_howto)
3213 (_bfd_score_info_to_howto): Likewise.
3214 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
3215 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3216 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3217 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
3218 (elf32_tic6x_info_to_howto_rel): Likewise.
3219 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
3220 * elf32-v850.c (v850_elf_info_to_howto_rel)
3221 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
3222 * elf32-vax.c (rtype_to_howto): Likewise.
3223 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3224 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
3225 (elf32_wasm32_info_to_howto_rela): Likewise.
3226 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
3227 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3228 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
3229 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3230 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3231 * elf64-gen.c (elf_generic_info_to_howto)
3232 (elf_generic_info_to_howto_rel): Likewise.
3233 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
3234 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
3235 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3236 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
3237 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
3238 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
3240 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
3241 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3243 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
3244 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
3245 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
3246 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
3247 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
3248 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
3249 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
3250 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
3251 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
3252 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
3255 2018-02-26 Jim Wilson <jimw@sifive.com>
3256 Stephan Schreiber <info@fs-driver.org>
3259 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
3260 call, set changed_contents and changed_relocs. Likewise after
3261 successful ia64_elf_relax_br call.
3263 2018-02-26 Alan Modra <amodra@gmail.com>
3265 * elf.c (assign_file_positions_except_relocs): Don't segfault
3266 when actual number of phdrs is less than allocated. Delete
3267 outdated comment. Formatting.
3269 2018-02-26 Alan Modra <amodra@gmail.com>
3271 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
3272 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
3273 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
3274 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
3275 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
3276 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
3277 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
3278 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
3279 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
3280 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
3281 error/warning messages.
3283 2018-02-26 Alan Modra <amodra@gmail.com>
3285 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
3286 * syms.c: Standardize error/warning messages.
3288 2018-02-26 Alan Modra <amodra@gmail.com>
3290 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
3291 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
3292 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
3293 * peXXigen.c, * peicode.h: Standardize error/warning messages.
3295 2018-02-26 Alan Modra <amodra@gmail.com>
3297 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
3299 2018-02-26 Alan Modra <amodra@gmail.com>
3301 * elfxx-mips.c: Standardize error/warning messages.
3303 2018-02-26 Alan Modra <amodra@gmail.com>
3305 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
3306 * elflink.c: Standardize error/warning messages. Replace use of
3307 linker callback einfo with _bfd_error_handler when possible.
3309 2018-02-26 Alan Modra <amodra@gmail.com>
3311 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
3312 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
3313 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
3314 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
3315 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
3316 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
3317 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
3318 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
3319 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
3320 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
3321 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
3322 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
3323 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
3324 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
3325 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
3326 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
3327 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
3328 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
3329 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
3330 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
3331 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
3332 unrecognized/unsupported reloc message.
3334 2018-02-26 Alan Modra <amodra@gmail.com>
3336 * elf32-ppc.c: Standardize error/warning messages. Use
3337 _bfd_error_handler rather than einfo when einfo features not used.
3338 * elf64-ppc.c: Likewise.
3340 2018-02-23 Alan Modra <amodra@gmail.com>
3343 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
3344 segment if no matching LOAD segment.
3346 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3348 * elf32-nds32.h: Define mask for ict_model.
3350 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
3352 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
3354 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3357 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3359 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3360 .reginfo section has wrong size.
3362 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3364 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
3365 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
3366 `.MIPS.abiflags' sections.
3367 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
3370 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3372 * section.c (SEC_FIXED_SIZE): New macro.
3373 * bfd-in2.h: Regenerate.
3375 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3377 * section.c (SEC_HAS_GOT_REF): Remove macro.
3378 * bfd-in2.h: Regenerate.
3380 2018-02-19 Alan Modra <amodra@gmail.com>
3382 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
3384 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
3385 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
3386 (_bfd_riscv_relax_pc): Likewise and fix typos.
3387 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
3388 * libbfd.h: Regenerate.
3390 2018-02-19 Alan Modra <amodra@gmail.com>
3392 * dwarf2.c (read_section): Don't use 'll' format modifier.
3393 (find_abstract_instance): Likewise.
3394 * elfcore.h (elf_core_file_p): Likewise.
3396 2018-02-19 Alan Modra <amodra@gmail.com>
3398 * bfd-in.h: Include inttypes.h or if not available define
3399 PRId64, PRIu64 and PRIx64.
3400 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
3401 modifier to print bfd_vma.
3402 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
3403 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
3404 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
3405 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
3406 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
3407 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
3408 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
3409 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
3410 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
3411 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
3412 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
3413 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
3414 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
3415 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
3416 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3417 and cast input to uint64_t, and similarly for Ld and Lu.
3418 * bfd-in2.h: Regenerate.
3420 2018-02-19 Alan Modra <amodra@gmail.com>
3422 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3423 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3424 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3425 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3426 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3427 * reloc.c: Replace use of %R and %T in format strings passed to
3428 einfo and friends by %pR and %pT.
3430 2018-02-19 Alan Modra <amodra@gmail.com>
3432 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3434 * aout-adobe.c: Update all messages using %A and %B.
3435 * aout-cris.c: Likewise.
3436 * aoutx.h: Likewise.
3437 * archive.c: Likewise.
3438 * binary.c: Likewise.
3439 * cache.c: Likewise.
3440 * coff-alpha.c: Likewise.
3441 * coff-arm.c: Likewise.
3442 * coff-i860.c: Likewise.
3443 * coff-mcore.c: Likewise.
3444 * coff-ppc.c: Likewise.
3445 * coff-rs6000.c: Likewise.
3446 * coff-sh.c: Likewise.
3447 * coff-tic4x.c: Likewise.
3448 * coff-tic54x.c: Likewise.
3449 * coff-tic80.c: Likewise.
3450 * coff64-rs6000.c: Likewise.
3451 * coffcode.h: Likewise.
3452 * coffgen.c: Likewise.
3453 * cofflink.c: Likewise.
3454 * coffswap.h: Likewise.
3455 * compress.c: Likewise.
3456 * cpu-arm.c: Likewise.
3457 * ecoff.c: Likewise.
3458 * elf-attrs.c: Likewise.
3459 * elf-eh-frame.c: Likewise.
3460 * elf-ifunc.c: Likewise.
3461 * elf-m10300.c: Likewise.
3462 * elf-properties.c: Likewise.
3463 * elf-s390-common.c: Likewise.
3465 * elf32-arc.c: Likewise.
3466 * elf32-arm.c: Likewise.
3467 * elf32-avr.c: Likewise.
3468 * elf32-bfin.c: Likewise.
3469 * elf32-cr16.c: Likewise.
3470 * elf32-cr16c.c: Likewise.
3471 * elf32-cris.c: Likewise.
3472 * elf32-crx.c: Likewise.
3473 * elf32-d10v.c: Likewise.
3474 * elf32-d30v.c: Likewise.
3475 * elf32-epiphany.c: Likewise.
3476 * elf32-fr30.c: Likewise.
3477 * elf32-frv.c: Likewise.
3478 * elf32-gen.c: Likewise.
3479 * elf32-hppa.c: Likewise.
3480 * elf32-i370.c: Likewise.
3481 * elf32-i386.c: Likewise.
3482 * elf32-i960.c: Likewise.
3483 * elf32-ip2k.c: Likewise.
3484 * elf32-iq2000.c: Likewise.
3485 * elf32-lm32.c: Likewise.
3486 * elf32-m32c.c: Likewise.
3487 * elf32-m32r.c: Likewise.
3488 * elf32-m68hc11.c: Likewise.
3489 * elf32-m68hc12.c: Likewise.
3490 * elf32-m68hc1x.c: Likewise.
3491 * elf32-m68k.c: Likewise.
3492 * elf32-mcore.c: Likewise.
3493 * elf32-mep.c: Likewise.
3494 * elf32-metag.c: Likewise.
3495 * elf32-microblaze.c: Likewise.
3496 * elf32-moxie.c: Likewise.
3497 * elf32-msp430.c: Likewise.
3498 * elf32-mt.c: Likewise.
3499 * elf32-nds32.c: Likewise.
3500 * elf32-nios2.c: Likewise.
3501 * elf32-or1k.c: Likewise.
3502 * elf32-pj.c: Likewise.
3503 * elf32-ppc.c: Likewise.
3504 * elf32-rl78.c: Likewise.
3505 * elf32-rx.c: Likewise.
3506 * elf32-s390.c: Likewise.
3507 * elf32-score.c: Likewise.
3508 * elf32-score7.c: Likewise.
3509 * elf32-sh-symbian.c: Likewise.
3510 * elf32-sh.c: Likewise.
3511 * elf32-sh64.c: Likewise.
3512 * elf32-sparc.c: Likewise.
3513 * elf32-spu.c: Likewise.
3514 * elf32-tic6x.c: Likewise.
3515 * elf32-tilepro.c: Likewise.
3516 * elf32-v850.c: Likewise.
3517 * elf32-vax.c: Likewise.
3518 * elf32-visium.c: Likewise.
3519 * elf32-wasm32.c: Likewise.
3520 * elf32-xgate.c: Likewise.
3521 * elf32-xtensa.c: Likewise.
3522 * elf64-alpha.c: Likewise.
3523 * elf64-gen.c: Likewise.
3524 * elf64-hppa.c: Likewise.
3525 * elf64-ia64-vms.c: Likewise.
3526 * elf64-mmix.c: Likewise.
3527 * elf64-ppc.c: Likewise.
3528 * elf64-s390.c: Likewise.
3529 * elf64-sh64.c: Likewise.
3530 * elf64-sparc.c: Likewise.
3531 * elf64-x86-64.c: Likewise.
3532 * elfcode.h: Likewise.
3533 * elfcore.h: Likewise.
3534 * elflink.c: Likewise.
3535 * elfnn-aarch64.c: Likewise.
3536 * elfnn-ia64.c: Likewise.
3537 * elfnn-riscv.c: Likewise.
3538 * elfxx-mips.c: Likewise.
3539 * elfxx-sparc.c: Likewise.
3540 * elfxx-tilegx.c: Likewise.
3541 * elfxx-x86.c: Likewise.
3542 * hpux-core.c: Likewise.
3545 * libbfd.c: Likewise.
3546 * linker.c: Likewise.
3547 * mach-o.c: Likewise.
3548 * merge.c: Likewise.
3550 * oasys.c: Likewise.
3551 * pdp11.c: Likewise.
3552 * pe-mips.c: Likewise.
3553 * peXXigen.c: Likewise.
3554 * peicode.h: Likewise.
3555 * reloc.c: Likewise.
3556 * rs6000-core.c: Likewise.
3558 * stabs.c: Likewise.
3559 * vms-alpha.c: Likewise.
3560 * xcofflink.c: Likewise.
3562 2018-02-19 Alan Modra <amodra@gmail.com>
3565 * elf.c (IS_TBSS): Define.
3566 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3567 (assign_file_positions_for_non_load_sections): Revert last change.
3568 Properly calculate load segment limits to compare against relro limits.
3570 2018-02-17 Alan Modra <amodra@gmail.com>
3573 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3574 degenerate zero size PT_LOAD segments when finding one overlapping
3575 the PT_GNU_RELRO segment.
3577 2018-02-16 Alan Modra <amodra@gmail.com>
3579 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3580 (_bfd_bool_bfd_true): Rename from bfd_true.
3581 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3582 (_bfd_int_bfd_0): Rename from bfd_0.
3583 (_bfd_uint_bfd_0): Rename from bfd_0u.
3584 (_bfd_long_bfd_0): Rename from bfd_0l.
3585 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3586 (_bfd_void_bfd): Rename from bfd_void.
3587 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3588 (_bfd_bool_bfd_link_false_error),
3589 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3590 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3591 (_bfd_bool_bfd_asection_bfd_asection_true),
3592 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3593 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3594 * archive.c (_bfd_noarchive_get_elt_at_index),
3595 (_bfd_noarchive_openr_next_archived_file),
3596 (_bfd_noarchive_construct_extended_name_table),
3597 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3598 (_bfd_noarchive_write_armap): New functions.
3599 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3600 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3601 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3602 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3603 (alpha_ecoff_swap_coff_lineno_out),
3604 (alpha_ecoff_swap_coff_reloc_out): New functions.
3605 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3606 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3607 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3608 (mips_ecoff_swap_coff_lineno_out),
3609 (mips_ecoff_swap_coff_reloc_out): New functions.
3610 * coffcode.h (coff_set_alignment_hook): Replace define with
3612 (symname_in_debug_hook): Likewise.
3613 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3614 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3615 * elf.c (assign_file_positions_except_relocs): Test
3616 elf_backend_allow_non_load_phdr for NULL.
3617 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3618 _bfd_elf_link_omit_section_dynsym. Update uses.
3619 (_bfd_elf_omit_section_dynsym_all): New function.
3620 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3621 (_bfd_elf_omit_section_dynsym_default): Declare.
3622 (_bfd_elf_omit_section_dynsym_all): Declare.
3623 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3624 (_bfd_nolink_bfd_get_relocated_section_contents),
3625 (_bfd_nolink_bfd_lookup_section_flags),
3626 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3627 (_bfd_nolink_bfd_link_hash_table_create),
3628 (_bfd_nolink_bfd_link_just_syms),
3629 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3630 (_bfd_nolink_bfd_link_split_section),
3631 (_bfd_nolink_section_already_linked),
3632 (_bfd_nolink_bfd_define_common_symbol),
3633 (_bfd_nolink_bfd_define_start_stop): New functions.
3634 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3635 (_bfd_norelocs_bfd_reloc_name_lookup),
3636 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3637 * section.c (_bfd_nowrite_set_section_contents): New function.
3638 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3639 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3640 (_bfd_nosymbols_get_symbol_version_string),
3641 (_bfd_nosymbols_bfd_is_local_label_name),
3642 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3643 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3644 (_bfd_nosymbols_bfd_make_debug_symbol),
3645 ( _bfd_nosymbols_read_minisymbols),
3646 ( _bfd_nosymbols_minisymbol_to_symbol),
3647 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3648 * libbfd-in.h: Declare new functions. Update existing defines,
3650 * aix386-core.c: Update to use new hooks. Formatting.
3651 * aout-adobe.c: Likewise.
3652 * aout-arm.c: Likewise.
3653 * aout-target.h: Likewise.
3654 * aout-tic30.c: Likewise.
3655 * aoutf1.h: Likewise.
3656 * binary.c: Likewise.
3658 * cisco-core.c: Likewise.
3659 * coff-alpha.c: Likewise.
3660 * coff-i386.c: Likewise.
3661 * coff-i860.c: Likewise.
3662 * coff-i960.c: Likewise.
3663 * coff-ia64.c: Likewise.
3664 * coff-mips.c: Likewise.
3665 * coff-ppc.c: Likewise.
3666 * coff-rs6000.c: Likewise.
3667 * coff-sh.c: Likewise.
3668 * coff-tic30.c: Likewise.
3669 * coff-tic54x.c: Likewise.
3670 * coff-x86_64.c: Likewise.
3671 * coff64-rs6000.c: Likewise.
3672 * coffcode.h: Likewise.
3673 * elf-m10300.c: Likewise.
3674 * elf32-cr16.c: Likewise.
3675 * elf32-lm32.c: Likewise.
3676 * elf32-m32r.c: Likewise.
3677 * elf32-metag.c: Likewise.
3678 * elf32-score.c: Likewise.
3679 * elf32-score7.c: Likewise.
3680 * elf32-tilepro.c: Likewise.
3681 * elf32-xstormy16.c: Likewise.
3682 * elf32-xtensa.c: Likewise.
3683 * elf64-alpha.c: Likewise.
3684 * elf64-hppa.c: Likewise.
3685 * elf64-ia64-vms.c: Likewise.
3686 * elf64-mmix.c: Likewise.
3687 * elf64-sh64.c: Likewise.
3688 * elfnn-ia64.c: Likewise.
3689 * elfxx-sparc.c: Likewise.
3690 * elfxx-target.h: Likewise.
3691 * elfxx-tilegx.c: Likewise.
3692 * elfxx-x86.h: Likewise.
3693 * hp300hpux.c: Likewise.
3694 * hppabsd-core.c: Likewise.
3695 * hpux-core.c: Likewise.
3696 * i386msdos.c: Likewise.
3697 * i386os9k.c: Likewise.
3700 * irix-core.c: Likewise.
3701 * libaout.h: Likewise.
3702 * libecoff.h: Likewise.
3703 * mach-o-target.c: Likewise.
3704 * mach-o.c: Likewise.
3705 * mipsbsd.c: Likewise.
3707 * netbsd-core.c: Likewise.
3708 * nlm-target.h: Likewise.
3709 * oasys.c: Likewise.
3710 * osf-core.c: Likewise.
3711 * pdp11.c: Likewise.
3712 * pe-mips.c: Likewise.
3713 * pe-x86_64.c: Likewise.
3715 * plugin.c: Likewise.
3716 * ppcboot.c: Likewise.
3717 * ptrace-core.c: Likewise.
3718 * sco5-core.c: Likewise.
3720 * sparclynx.c: Likewise.
3722 * tekhex.c: Likewise.
3723 * trad-core.c: Likewise.
3724 * verilog.c: Likewise.
3725 * versados.c: Likewise.
3726 * vms-alpha.c: Likewise.
3727 * vms-lib.c: Likewise.
3728 * wasm-module.c: Likewise.
3730 * libbfd.h: Regenerate.
3732 2018-02-15 Jim Wilson <jimw@sifive.com>
3734 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3735 symbols whose section address is zero.
3737 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3738 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3739 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3740 Add %X%P to error messages.
3742 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3745 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3746 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3747 and assert that the result of the call is not NULL.
3749 2018-02-14 Nick Clifton <nickc@redhat.com>
3752 Revert previous delta. Add extra casts to avoid compile time
3754 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3755 cast to avoid warning from gcc v8 compiler.
3756 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3757 (_bfd_generic_bfd_set_private_flags): Likewise.
3758 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3759 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3760 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3761 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3762 (_bfd_noarchive_construct_extended_name_table): Likewise.
3763 (_bfd_noarchive_truncate_arname): Likewise.
3764 (_bfd_noarchive_write_ar_hdr): Likewise.
3765 (_bfd_noarchive_get_elt_at_index): Likewise.
3766 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3767 (_bfd_nosymbols_print_symbol): Likewise.
3768 (_bfd_nosymbols_get_symbol_info): Likewise.
3769 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3770 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3771 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3772 (_bfd_nosymbols_get_lineno): Likewise.
3773 (_bfd_nosymbols_find_nearest_line): Likewise.
3774 (_bfd_nosymbols_find_line): Likewise.
3775 (_bfd_nosymbols_find_inliner_info): Likewise.
3776 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3777 (_bfd_nosymbols_read_minisymbols): Likewise.
3778 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3779 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3780 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3781 (_bfd_nowrite_set_arch_mach): Likewise.
3782 (_bfd_nowrite_set_section_contents): Likewise.
3783 (_bfd_nolink_sizeof_headers): Likewise.
3784 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3785 (_bfd_nolink_bfd_relax_section): Likewise.
3786 (_bfd_nolink_bfd_gc_sections): Likewise.
3787 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3788 (_bfd_nolink_bfd_merge_sections): Likewise.
3789 (_bfd_nolink_bfd_is_group_section): Likewise.
3790 (_bfd_nolink_bfd_discard_group): Likewise.
3791 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3792 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3793 (_bfd_nolink_bfd_link_just_syms): Likewise.
3794 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3795 (_bfd_nolink_bfd_final_link): Likewise.
3796 (_bfd_nolink_bfd_link_split_section): Likewise.
3797 (_bfd_nolink_section_already_linked): Likewise.
3798 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3799 (_bfd_nolink_bfd_define_start_stop): Likewise.
3800 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3801 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3802 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3803 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3804 * libbfd.c (bfd_false_any): Delete.
3805 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3806 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3807 * libbfd.h (extern): Regenerate
3808 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3809 cast to avoid warning from gcc v8 compiler.
3810 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3811 * binary.c (binary_get_symbol_info): Likewise.
3812 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3813 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3814 * coffcode.h (coff_set_alignment_hook): Likewise.
3815 (symname_in_debug_hook): Likewise.
3816 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3817 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3818 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3819 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3820 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3821 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3822 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3823 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3824 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3825 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3826 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3827 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3828 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3829 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3830 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3831 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3832 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3833 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3834 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3835 (bfd_elfNN_bfd_set_private_flags): Likewise.
3836 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3837 (elf_backend_init_index_section): Likewise.
3838 (elf_backend_allow_non_load_phdr): Likewise.
3839 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3840 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3841 * ieee.c (ieee_construct_extended_name_table): Likewise.
3842 (ieee_write_armap): Likewise.
3843 (ieee_write_ar_hdr): Likewise.
3844 (ieee_bfd_is_target_special_symbol): Likewise.
3845 * ihex.c (ihex_canonicalize_symtab): Likewise.
3846 (ihex_bfd_is_target_special_symbol): Likewise.
3847 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3848 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3849 (_bfd_ecoff_set_alignment_hook): Likewise.
3850 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3851 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3852 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3853 * oasys.c (oasys_construct_extended_name_table): Likewise.
3854 (oasys_write_armap): Likewise.
3855 (oasys_write_ar_hdr): Likewise.
3856 (oasys_bfd_is_target_special_symbol): Likewise.
3857 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3858 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3859 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3860 * som.c (som_bfd_is_target_special_symbol): Likewise.
3861 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3862 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3863 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3864 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3865 (versados_bfd_reloc_name_lookup): Likewise.
3866 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3867 (vms_bfd_define_start_stop): Likewise.
3868 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3869 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3870 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3872 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3875 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3876 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3877 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3878 R_X86_64_PC32 reloc against dynamic function in data section.
3879 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3880 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3881 against dynamic function in data section.
3882 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3883 function address only if pcrel_plt is true.
3884 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3885 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3886 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3887 PC-relative relocation against a function definition in data
3888 secton in PIE. Remove the obsolete comments.
3889 (elf_x86_link_hash_table): Add pcrel_plt.
3891 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3893 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3894 instead of bfd_link_pic, for building shared library.
3896 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3899 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3900 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3901 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3902 against protected function in shared object.
3904 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3907 * po/ru.po: Fix typo in Russian translation.
3909 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3911 * wasm-module.c (wasm_scan_name_function_section): Rename
3912 `index' local variable to `idx'.
3914 2018-02-13 Nick Clifton <nickc@redhat.com>
3917 Fix compile time warnings generated by gcc version 8.
3918 * libbfd-in.h: Remove extraneous text from prototypes.
3919 Add prototypes for bfd_false_any, bfd_true_any,
3920 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3921 bfd_n1_any, bfd_void_any.
3922 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3924 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3925 (_bfd_generic_bfd_set_private_flags): Likewise.
3926 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3927 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3928 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3929 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3930 (_bfd_noarchive_construct_extended_name_table): Likewise.
3931 (_bfd_noarchive_truncate_arname): Likewise.
3932 (_bfd_noarchive_write_ar_hdr): Likewise.
3933 (_bfd_noarchive_get_elt_at_index): Likewise.
3934 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3935 (_bfd_nosymbols_print_symbol): Likewise.
3936 (_bfd_nosymbols_get_symbol_info): Likewise.
3937 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3938 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3939 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3940 (_bfd_nosymbols_get_lineno): Likewise.
3941 (_bfd_nosymbols_find_nearest_line): Likewise.
3942 (_bfd_nosymbols_find_line): Likewise.
3943 (_bfd_nosymbols_find_inliner_info): Likewise.
3944 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3945 (_bfd_nosymbols_read_minisymbols): Likewise.
3946 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3947 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3948 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3949 (_bfd_nowrite_set_arch_mach): Likewise.
3950 (_bfd_nowrite_set_section_contents): Likewise.
3951 (_bfd_nolink_sizeof_headers): Likewise.
3952 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3953 (_bfd_nolink_bfd_relax_section): Likewise.
3954 (_bfd_nolink_bfd_gc_sections): Likewise.
3955 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3956 (_bfd_nolink_bfd_merge_sections): Likewise.
3957 (_bfd_nolink_bfd_is_group_section): Likewise.
3958 (_bfd_nolink_bfd_discard_group): Likewise.
3959 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3960 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3961 (_bfd_nolink_bfd_link_just_syms): Likewise.
3962 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3963 (_bfd_nolink_bfd_final_link): Likewise.
3964 (_bfd_nolink_bfd_link_split_section): Likewise.
3965 (_bfd_nolink_section_already_linked): Likewise.
3966 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3967 (_bfd_nolink_bfd_define_start_stop): Likewise.
3968 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3969 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3970 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3971 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3972 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3973 accepts one or more arguments.
3974 (bfd_true_any): Likewise.
3975 (bfd_nullvoidptr_any): Likewise.
3976 (bfd_0_any): Likewise.
3977 (bfd_0u_any): Likewise.
3978 (bfd_0l_any): Likewise.
3979 (_bfd_n1_any): Likewise.
3980 (bfd_void_any): Likewise.
3981 * libbfd.h (extern): Regenerate
3982 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3983 based dummy function.
3984 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3985 * binary.c (binary_get_symbol_info): Likewise.
3986 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3987 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3988 * coffcode.h (coff_set_alignment_hook): Likewise.
3989 (symname_in_debug_hook): Likewise.
3990 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3991 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3992 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3993 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3994 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3995 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3996 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3997 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3998 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3999 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
4000 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
4001 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
4002 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
4003 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
4004 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
4005 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
4006 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
4007 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
4008 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
4009 (bfd_elfNN_bfd_set_private_flags): Likewise.
4010 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
4011 (elf_backend_init_index_section): Likewise.
4012 (elf_backend_allow_non_load_phdr): Likewise.
4013 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
4014 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
4015 * ieee.c (ieee_construct_extended_name_table): Likewise.
4016 (ieee_write_armap): Likewise.
4017 (ieee_write_ar_hdr): Likewise.
4018 (ieee_bfd_is_target_special_symbol): Likewise.
4019 * ihex.c (ihex_canonicalize_symtab): Likewise.
4020 (ihex_bfd_is_target_special_symbol): Likewise.
4021 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
4022 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
4023 (_bfd_ecoff_set_alignment_hook): Likewise.
4024 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
4025 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
4026 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
4027 * oasys.c (oasys_construct_extended_name_table): Likewise.
4028 (oasys_write_armap): Likewise.
4029 (oasys_write_ar_hdr): Likewise.
4030 (oasys_bfd_is_target_special_symbol): Likewise.
4031 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
4032 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
4033 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
4034 * som.c (som_bfd_is_target_special_symbol): Likewise.
4035 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
4036 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
4037 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
4038 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
4039 (versados_bfd_reloc_name_lookup): Likewise.
4040 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
4041 (vms_bfd_define_start_stop): Likewise.
4042 (alpha_vms_bfd_is_target_special_symbol): Likewise.
4043 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
4044 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
4045 * elf32-arc.c (get_replace_function): Assign replacement function
4047 * elf32-i370.c (i370_noop): Update prototype.
4049 2018-02-13 Alan Modra <amodra@gmail.com>
4052 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
4053 relocation sections. If size reduces to just the flag word,
4054 remove that too and mark with SEC_EXCLUDE.
4055 * elflink.c (bfd_elf_final_link): Strip empty group sections.
4057 2018-02-13 Alan Modra <amodra@gmail.com>
4060 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
4063 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
4065 * i386msdos.c (msdos_mkobject); New function.
4066 (msdos_object_p): New function.
4067 (i386_msdos_vec): Use msdos_object_p as the check_format
4069 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
4070 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
4072 * peXXigen.c: Likewise.
4073 * coff-ia64.c: Likewise.
4075 2018-02-12 Nick Clifton <nickc@redhat.com>
4077 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
4079 * elf32-arc.c (elf_arc_relocate_section): Likewise.
4081 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4083 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
4084 (sparc_elf_append_rela): Assert that there is enough room in section.
4085 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
4086 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
4087 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
4088 For a symbol subject to a GOT relocation, reserve a slot in the
4089 relocation section if the symbol isn't dynamic and we are in PIC mode.
4090 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
4091 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
4092 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
4093 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
4094 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
4095 resolved_to_zero. Do not generate a dynamic GOT relocation for an
4096 undefined weak symbol with non-default visibility. Remove superfluous
4097 'else' and fix formatting.
4099 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
4101 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
4103 (i386_elf32_sol2_vec): Don't declare.
4104 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
4105 Don't set need_global_offset_table.
4106 (elf_i386_solaris_arch_bed): New.
4107 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
4109 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
4110 target_os != is_nacl instead of target_os == is_normal.
4111 (x86_64_elf64_sol2_vec): Don't declare.
4112 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
4113 is_nacl instead of target_os == is_normal. Don't set
4114 need_global_offset_table.
4115 (elf_x86_64_solaris_arch_bed): New.
4116 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
4118 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
4119 _GLOBAL_OFFSET_TABLE_ for Solaris.
4120 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
4121 need_global_offset_table.
4122 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
4123 (elf_x86_link_hash_table): Remove need_global_offset_table.
4124 (elf_x86_init_table): Likewise.
4126 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
4128 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4130 (i386_elf32_sol2_vec): Declared.
4131 (elf_i386_link_setup_gnu_properties): Set
4132 need_global_offset_table with info->output_bfd->xvec.
4133 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4135 (x86_64_elf64_sol2_vec): Declared.
4136 (elf_x86_64_link_setup_gnu_properties): Set
4137 need_global_offset_table with info->output_bfd->xvec.
4139 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
4141 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4143 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
4145 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4147 (elf_x86_64_link_setup_gnu_properties): Set
4148 need_global_offset_table for Solaris.
4149 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
4150 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
4151 (_bfd_x86_elf_link_setup_gnu_properties): Copy
4152 need_global_offset_table.
4153 * elfxx-x86.h (elf_x86_link_hash_table): Add
4154 need_global_offset_table.
4155 (elf_x86_init_table): Likewise.
4157 2018-02-08 Jim Wilson <jimw@sifive.com>
4159 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
4162 2018-02-08 Nick Clifton <nickc@redhat.com>
4165 * elf.c (elf_parse_notes): Reject notes with excessuively large
4168 2018-02-07 Alan Modra <amodra@gmail.com>
4170 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
4171 * elf32-ppc.c: Remove speculation barrier support.
4172 * elf32-ppc.h: Likewise.
4173 * elf64-ppc.c: Likewise.
4174 * elf64-ppc.h: Likewise.
4176 2018-02-06 Jim Wilson <jimw@sifive.com>
4178 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
4179 callback to report an error.
4181 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
4184 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
4185 into call to !bfd_link_executable and tidy up.
4186 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
4187 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
4188 !bfd_link_executable.
4189 <R_SPARC_TLS_IE_HI22>: Likewise.
4190 <GOT relocations>: Remove useless code, tidy and merge related blocks.
4191 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
4192 !bfd_link_executable.
4193 <R_SPARC_WPLT30>: Tidy up.
4194 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
4195 !bfd_link_executable.
4196 (allocate_dynrelocs): Likewise.
4197 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
4198 <R_SPARC_TLS_GD_HI22>: Merge into...
4199 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
4200 sparc_elf_tls_transition and remove redundant code.
4201 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
4202 !bfd_link_executable.
4203 <R_SPARC_TLS_LDO_HIX22>: Likewise.
4204 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
4205 <R_SPARC_TLS_LDM_CALL>: Likewise.
4206 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
4207 <R_SPARC_TLS_GD_ADD>: Likewise.
4208 <R_SPARC_TLS_LDM_ADD>: Likewise.
4209 <R_SPARC_TLS_LDO_ADD>: Likewise.
4210 <R_SPARC_TLS_IE_LD>: Likewise.
4212 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
4215 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
4216 functions failed to find the function name, try the generic elf
4217 find function instead.
4219 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
4221 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
4222 'memcpy' instead of 'strncpy' when writing the magic number.
4224 2018-02-06 Nick Clifton <nickc@redhat.com>
4227 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
4228 section before attempting to read it in.
4229 (bfd_get_alt_debug_link_info): Likewise.
4231 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
4233 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
4234 line information in addition to name, if they can be found.
4236 2018-02-05 Renlin Li <renlin.li@arm.com>
4239 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
4240 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
4241 check for writeable section as well.
4243 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
4246 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
4247 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
4248 undefined weak symbol to 0.
4249 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
4250 if _GLOBAL_OFFSET_TABLE_ is referenced.
4251 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
4252 got_referenced instead of ref_regular_nonweak. Remove the
4253 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
4254 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
4256 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4258 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
4259 initialize `hi_reloc'.
4261 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4263 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
4264 SHT_MIPS_REGINFO sections don't assert the correct size and
4265 report an error instead.
4267 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4269 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
4270 status from `->elf_backend_section_processing'.
4272 2018-02-02 Jim Wilson <jimw@sifive.com>
4275 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
4276 If link_info->wrap_hash, check for a duplicate symbol and ignore.
4277 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
4278 Pass new argument to riscv_relax_delete_bytes.
4279 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
4280 ATTRIBUTE_UNUSED from link_info parameter.
4282 2018-02-02 Alan Modra <amodra@gmail.com>
4284 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
4285 emitted for toc sequence optimization. Set and use "howto" later.
4287 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
4289 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
4290 arithmetic on NULL pointer.
4291 * elflink.c (_bfd_elf_archive_symbol_lookup,
4292 elf_link_add_archive_symbols): Likewise.
4294 2018-01-31 Michael Matz <matz@suse.de>
4296 * elflink.c (bfd_elf_define_start_stop): Fix check of
4299 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
4302 * elflink.c (bfd_elf_define_start_stop): Check if __start and
4303 __stop symbols are referenced by shared objects.
4305 2018-01-30 Alan Modra <amodra@gmail.com>
4308 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
4309 segment when demand paged with lma on the same page. Test this
4310 before load/non-load, executable/non-executable,
4311 writable/non-writable tests and simplify. Delete bogus relro
4312 condition in writable/non-writable test. Delete outdated
4313 comment. Formatting.
4315 2018-01-30 Alan Modra <amodra@gmail.com>
4317 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
4320 2018-01-29 Alan Modra <amodra@gmail.com>
4323 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
4324 range before converting to a symbol table pointer.
4326 2018-01-27 Nick Clifton <nickc@redhat.com>
4328 * po/ru.po: Updated Russian translation.
4330 2018-01-26 Alan Modra <amodra@gmail.com>
4332 * elflink.c (bfd_elf_define_start_stop): Override symbols when
4333 they are defined dynamically.
4335 2018-01-26 Alan Modra <amodra@gmail.com>
4337 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
4338 .branch_lt changes size.
4340 2018-01-25 Alan Modra <amodra@gmail.com>
4343 * elfcode.h (elf_object_p): Avoid integer overflow.
4345 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
4348 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
4349 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
4352 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
4355 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
4356 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
4357 bfd_link_executable for TLS check.
4358 (_bfd_sparc_elf_check_relocs): Likewise.
4359 (allocate_dynrelocs): Likewise.
4360 (_bfd_sparc_elf_relocate_section): Likewise.
4362 2018-01-24 Renlin Li <renlin.li@arm.com>
4364 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
4365 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4366 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4367 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4368 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4369 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4370 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4372 2018-01-24 Renlin Li <renlin.li@arm.com>
4374 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
4375 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
4376 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
4377 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
4378 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
4379 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4380 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4381 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4382 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4383 * bfd-in2.h: Regenerate.
4384 * libbfd.h: Regenerate.
4386 2018-01-23 Maciej W. Rozycki <macro@mips.com>
4388 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
4389 `mips_elf32_section_processing' comment reference.
4391 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
4394 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
4395 versioned __tls_get_addr symbol.
4397 2018-01-19 Nick Clifton <nickc@redhat.com>
4399 * po/fr.po: Updated French translation.
4401 2018-01-18 Alan Modra <amodra@gmail.com>
4403 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
4404 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
4405 (ppc64_elf_build_stubs): Likewise.
4407 2018-01-17 Nick Clifton <nickc@redhat.com>
4409 * po/ru.po: Updated Russian translation.
4410 * po/uk/po: Updated Ukranian translation.
4412 2018-01-17 Alan Modra <amodra@gmail.com>
4414 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
4416 2018-01-17 Alan Modra <amodra@gmail.com>
4418 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4419 (CRSETEQ, BEQCTRM): Define.
4420 (is_nonpic_glink_stub): Don't check bctr.
4421 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4422 (ppc_elf_relax_section): Size speculation barrier.
4423 (output_bctr): New function.
4424 (write_glink_stub): Use output_bctr.
4425 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4426 (ppc_elf_finish_dynamic_symbol): Likewise.
4427 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4428 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4429 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4430 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4431 (size_global_entry_stubs): Handle speculation barrier sizing.
4432 (plt_stub_size): Likewise.
4433 (output_bctr): New function.
4434 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4436 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4437 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4438 (build_global_entry_stubs): Output speculation barrier.
4439 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4440 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4442 2018-01-17 Alan Modra <amodra@gmail.com>
4444 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4445 __tls_get_addr_opt, and alignment sizing.
4446 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4447 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4448 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4450 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4451 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4452 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4454 (write_glink_stub): Handle __tls_get_addr_opt stub.
4455 Pad out to size given by GLINK_ENTRY_SIZE.
4456 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4457 (ppc_elf_finish_dynamic_symbol): Likewise.
4458 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4459 insn array since so many need rewriting.
4460 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4461 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4462 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4463 nops. Adjust all uses.
4464 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4465 in glink_vma calculation.
4466 (struct ppc_link_hash_table): Add global_entry section pointer.
4467 (create_linkage_sections): Create separate section for global
4469 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4470 (size_global_entry_stubs): Handle sizing for aligned stubs.
4471 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4472 and don't stash end of glink branch table in rawsize.
4473 (ppc_build_one_stub): Rewrite stub size calculations.
4474 (build_global_entry_stubs): Use new section.
4475 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4476 Build lazy link stubs out to end of section. Build global entry
4477 stubs in new section.
4479 2018-01-15 Nick Clifton <nickc@redhat.com>
4481 * po/uk.po: Updated Ukranian translation.
4483 2018-01-13 Nick Clifton <nickc@redhat.com>
4485 * po/bfd.pot: Regenerated.
4487 2018-01-13 Nick Clifton <nickc@redhat.com>
4489 * version.m4: Bump version to 2.30.51
4490 * configure: Regenerate.
4492 2018-01-13 Nick Clifton <nickc@redhat.com>
4494 2.30 branch created.
4496 2018-01-12 Jens Widell <jl@opera.com>
4498 * elf.c (setup_group): Optimize search for group by remembering
4499 last found group and restarting search at that index.
4500 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4502 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4504 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4505 bfd_link_common_skip_none in switch.
4507 2018-01-12 Alan Modra <amodra@gmail.com>
4510 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4511 references on forced local symbols.
4513 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
4515 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4516 .reginfo section has wrong size.
4518 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4521 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4522 separate code and read-only data LOAD segments, create a new
4523 LOAD segment if the previous section contains text and the
4524 current section doesn't or vice versa. Don't put a writable
4525 section in a read-only segment if there is a RELRO segment.
4527 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4530 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4531 references on forced local symbols.
4533 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4536 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4537 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4539 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4542 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4544 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4546 * elf.c (elfcore_grok_freebsd_note): Handle
4547 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4548 NT_FREEBSD_PROCSTAT_VMMAP.
4550 2018-01-03 Alan Modra <amodra@gmail.com>
4552 Update year range in copyright notice of all files.
4554 For older changes see ChangeLog-2017
4556 Copyright (C) 2018 Free Software Foundation, Inc.
4558 Copying and distribution of this file, with or without modification,
4559 are permitted in any medium without royalty provided the copyright
4560 notice and this notice are preserved.
4566 version-control: never