1 2018-10-09 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3 * elflink.c (elf_link_output_extsym): Do not place symbols into a
6 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
9 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
10 add GNU_PROPERTY_X86_FEATURE_2_NEEDED to force program header
11 in non-code PT_LOAD segment.
13 2018-10-08 Alan Modra <amodra@gmail.com>
15 * elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
17 * elf.c (_bfd_elf_map_sections_to_segments): Assume file and
18 program headers are required when info->load_phdrs. Reorganize
19 code handling program headers. Generate a mapping without
20 sections just for file and program headers when -z separate-code
21 would indicate they should be on a different page to the first
24 2018-10-08 Alan Modra <amodra@gmail.com>
26 * elf.c (assign_file_positions_for_load_sections): Set p_vaddr
27 from m->p_vaddr_offset for segments without sections. Invert
28 sign of p_vaddr_offset.
29 (rewrite_elf_program_header, copy_elf_program_header): Save
30 old segment p_vaddr to p_vaddr_offset. Invert sign of
33 2018-10-08 Alan Modra <amodra@gmail.com>
35 * elf.c (get_program_header_size): Don't count PT_INTERP if
37 (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if
40 2018-10-08 Alan Modra <amodra@gmail.com>
42 * elf32-spu.c (spu_elf_modify_segment_map): Don't insert
43 overlays before segment containing headers.
45 2018-10-08 Alan Modra <amodra@gmail.com>
47 * elf.c (make_mapping): Cope with zero size array at end of
48 struct elf_segment_map.
49 (_bfd_elf_map_sections_to_segments): Likewise.
50 (rewrite_elf_program_header, copy_elf_program_header): Likewise.
51 (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
53 2018-10-05 Alan Modra <amodra@gmail.com>
55 * elf32-spu.c (spu_elf_create_sections): Make .note.spu_name
58 2018-10-05 Richard Henderson <rth@twiddle.net>
60 * bfd-in2.h: Regenerated.
61 * elf32-or1k.c: (or1k_elf_howto_table): Fix formatting for
62 R_OR1K_PLT26, Add R_OR1K_PCREL_PG21, R_OR1K_GOT_PG21,
63 R_OR1K_TLS_GD_PG21, R_OR1K_TLS_LDM_PG21, R_OR1K_TLS_IE_PG21,
64 R_OR1K_LO13, R_OR1K_GOT_LO13, R_OR1K_TLS_GD_LO13, R_OR1K_TLS_LDM_LO13,
65 R_OR1K_TLS_IE_LO13, R_OR1K_SLO13, R_OR1K_PLTA26.
66 (or1k_reloc_map): Add BFD_RELOC_OR1K_PCREL_PG21,
67 BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_TLS_GD_PG21,
68 BFD_RELOC_OR1K_TLS_LDM_PG21, BFD_RELOC_OR1K_TLS_IE_PG21,
69 BFD_RELOC_OR1K_LO13, BFD_RELOC_OR1K_GOT_LO13,
70 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_GD_LO13,
71 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_LO13,
72 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_PLTA26.
73 (elf_or1k_link_hash_table): Add field saw_plta.
74 (or1k_final_link_relocate): Add value calculations for new relocations.
75 (or1k_elf_relocate_section): Add section relocations for new
77 (or1k_write_plt_entry): New function.
78 (or1k_elf_finish_dynamic_sections): Add support for PLTA relocations
79 using new l.adrp instruction. Cleanup PLT relocation code generation.
80 * libbfd.h: Regenerated.
81 * reloc.c: Add BFD_RELOC_OR1K_PCREL_PG21, BFD_RELOC_OR1K_LO13,
82 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_GOT_LO13,
83 BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_TLS_GD_PG21,
84 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_LDM_PG21,
85 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_PG21,
86 BFD_RELOC_OR1K_TLS_IE_LO13.
88 2018-10-05 Richard Henderson <rth@twiddle.net>
90 * elf32-or1k.c (or1k_elf_relocate_section): Add error for unknown
91 relocations. Add error for non zero addend with plt and got
92 relocations. Add error for got and plt references against dynamic, non
93 local, symbols. Add error when linking non shared liraries with
96 2018-10-05 Richard Henderson <rth@twiddle.net>
97 Stafford Horne <shorne@gmail.com>
99 * bfd-in2.h: Regenerated.
100 * elf32-or1k.c (N_ONES): New macro.
101 (or1k_elf_howto_table): Fix R_OR1K_PLT26 to complain on overflow.
102 Add definitions for R_OR1K_TLS_TPOFF, R_OR1K_TLS_DTPOFF,
103 R_OR1K_TLS_DTPMOD, R_OR1K_AHI16, R_OR1K_GOTOFF_AHI16,
104 R_OR1K_TLS_IE_AHI16, R_OR1K_TLS_LE_AHI16, R_OR1K_SLO16,
105 R_OR1K_GOTOFF_SLO16, R_OR1K_TLS_LE_SLO16.
106 (or1k_reloc_map): Add entries for BFD_RELOC_HI16_S,
107 BFD_RELOC_LO16_GOTOFF, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_S_GOTOFF,
108 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
109 BFD_RELOC_OR1K_SLO16, BFD_RELOC_OR1K_GOTOFF_SLO16,
110 BFD_RELOC_OR1K_TLS_LE_SLO16.
111 (or1k_reloc_type_lookup): Change search loop to start ad index 0 and
112 also check results before returning.
113 (or1k_reloc_name_lookup): Simplify loop to use R_OR1K_max as index
115 (or1k_final_link_relocate): New function.
116 (or1k_elf_relocate_section): Add support for new AHI and SLO
117 relocations. Use or1k_final_link_relocate instead of generic
118 _bfd_final_link_relocate.
119 (or1k_elf_check_relocs): Add support for new AHI and SLO relocations.
120 * reloc.c: Add new enums for BFD_RELOC_OR1K_SLO16,
121 BFD_RELOC_OR1K_GOTOFF_SLO16, BFD_RELOC_OR1K_TLS_IE_AHI16,
122 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
123 BFD_RELOC_OR1K_TLS_LE_SLO16. Remove unused BFD_RELOC_OR1K_GOTOFF_HI16
124 and BFD_RELOC_OR1K_GOTOFF_LO16.
125 * libbfd.h: Regenerated.
127 2018-10-04 Jim Wilson <jimw@sifive.com>
129 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): In dynobj->sections
130 loop, handle htab->sdyntdata section.
132 2018-10-04 Jose E. Marchesi <jose.marchesi@oracle.com>
134 * elf64-sparc.c (elf64_sparc_output_arch_syms): Do notcorrect the
135 impact of STT_REGISTER symbols in the dynsym sh_info here...
136 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): ...but
139 2018-10-03 H.J. Lu <hongjiu.lu@intel.com>
142 * elf.c (get_program_header_size): Put all adjacent SHT_NOTE
143 sections with the same section alignment into a single PT_NOTE
144 segment. Check SHT_NOTE section type instead of section name.
145 (_bfd_elf_map_sections_to_segments): Likewise.
147 2018-10-03 Millan Wolff <mail@milianw.de>
150 * dwarf2.c (find_abstract_instance): Allow recursive invocations
151 of find_abstract_instance to override the name variable.
153 2018-10-03 Nick Clifton <nickc@redhat.com>
155 * po/pt.po: Updated Portuguese translation.
157 2018-10-01 Cupertino Miranda <cmiranda@synopsys.com>
159 * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take TLS
160 section alignment in consideration for this relocation. Fixed TCB_SIZE
161 offset size to include section alignment.
162 (get_got_entry_list_for_symbol): Changed.
163 * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
164 (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
165 (arc_special_overflow_checks): Fixed TCB_SIZE offsize to include
167 (elf_arc_check_relocs): Changed.
168 (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
169 (struct elf_arc_link_hash_entry): Moved and changed.
170 (elf_arc_link_hash_newfunc): Changed.
171 (arc_elf_link_hash_table_create): Removed old initializations.
172 (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
174 2018-09-28 H.J. Lu <hongjiu.lu@intel.com>
176 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Use
177 elfclass instead of bed->s->elfclass.
179 2018-09-27 Jim Wilson <jimw@sifive.com>
181 * elfnn-riscv.c (riscv_init_pcgp_relocs): Add explanatory comment.
182 (riscv_free_pcgp_relocs, riscv_record_pcgp_reloc): Likewise.
183 (riscv_find_pcgp_hi_reloc, riscv_reocrd_pcgp_lo_reloc): Likewise.
184 (riscv_find_pcgp_lo_reloc): Likewise.
185 (riscv_delete_pcgp_hi_reloc, riscv_use_pcgp_hi_reloc): Delete.
186 (riscv_delete_pcgp_lo_reloc): Likewise.
187 (_bfd_riscv_relax_pc): Don't call riscv_use_pcgp_hi_reloc. Replace
188 calls to riscv_delete_pcgp_lo_reloc and riscv_delete_pcgp_hi_reloc
189 with TRUE. Mark abfd arg as ATTRIBUTE_UNUSED.
191 2018-09-25 Jim Wilson <jimw@sifive.com>
193 * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
194 return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
195 and return FALSE. Return TRUE at end.
196 (riscv_make_plt_entry): Likewise.
197 (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
198 (riscv_elf_finish_dynamic_sections): Update call to
199 riscv_make_plt_header.
201 2018-09-24 Jim Wilson <jimw@sifive.com>
203 * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
204 hi_sec_off which is symbol address with addend subtracted. Use in
205 riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
207 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
208 overflow with addend. Use reloc_dangerous instead of reloc_overflow.
209 Add strings for the two errors handled here.
210 (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
211 comment. Only give error with addend when used with section symbol.
212 In case bfd_reloc_dangerous, update error string.
214 2018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
217 * elf.c (_bfd_elf_write_object_contents): Return from function
218 early if abfd->direction == both_direction.
220 2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
222 * configure.ac: Check for fls.
223 * elf32-nds32.c (fls): Only define if !HAVE_FLS.
224 * config.in: Re-generate.
225 * configure: Re-generate.
227 2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
229 * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
230 duplicate `case' selectors.
232 2018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
234 * elf32-nds32.c (nds32_elf_relax_loadstore):
235 Remove the unused target features.
236 (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
237 (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
238 nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
239 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
240 nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
241 calculate_plt_offset, calculate_got_memory_address,
242 nds32_elf_check_dup_relocs): Removed.
244 * elf32-nds32.h: Remove the unused macros and defines.
245 (elf_nds32_link_hash_table): Remove the unused variable.
246 (bfd_elf32_nds32_set_target_option): Update prototype.
247 (nds32_elf_ex9_init): Removed.
248 * elf32-nds32.c (nds32_convert_32_to_16): Updated.
249 * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
250 to initialize array nds32_elf_howto_table in any order
251 without lots of EMPTY_HOWTO.
252 (nds32_reloc_map): Updated.
253 * reloc.c: Add BFD_RELOC_NDS32_LSI.
254 * bfd-in2.h: Regenerated.
255 * bfd/libbfd.h: Regenerated.
256 * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
257 (nds32_reloc_map): Likewise.
258 (nds32_elf_relax_flsi): New function.
259 (nds32_elf_relax_section): Support floating load/store relaxation.
260 * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
262 (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
263 (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
264 (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
265 nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
267 (nds32_info_to_howto_rel): Add BFD_ASSERT.
268 (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
269 nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
270 nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
271 bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
272 (nds32_elf_final_sda_base): Improve it to find the better gp value.
273 (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
274 * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
275 (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
276 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
277 (create_got_section): Likewise.
278 (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
279 nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
280 (nds32_elf_check_relocs): Fix the issue that the shared library may
281 has TEXTREL entry in the dynamic section.
282 (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
283 since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
284 (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
286 (calculate_offset): Remove the unused parameter `pic_ext_target' and
289 (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
290 will cause some errors for our test cases.
291 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
293 * reloc.c: Add TLS relocations.
294 * libbfd.h: Regenerated.
295 * bfd-in2.h: Regenerated.
296 * elf32-nds32.h (struct section_id_list_t): New.
297 (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
298 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
300 (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
302 (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
303 elf_nds32_link_hash_table): Updated.
304 * elf32-nds32.c (enum elf_nds32_tls_type): New.
305 (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
306 (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
307 fls, ones32, list_insert, list_insert_sibling, dump_chain,
308 elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
309 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
310 (elf_nds32_obj_tdata): Add new fields.
311 (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
312 (nds32_elf_howto_table): Add TLS relocations.
313 (nds32_reloc_map): Likewise.
314 (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
315 nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
316 nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
317 nds32_elf_check_relocs, allocate_dynrelocs): Updated.
318 (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
319 (dtpoff_base): Rename it to `gottpof' and then update it.
321 2018-09-20 Alan Modra <amodra@gmail.com>
324 * peXXigen.c (pe_print_edata): Correct export address table
325 overflow checks. Check dataoff against section size too.
327 2018-09-20 Alan Modra <amodra@gmail.com>
330 * dwarf2.c (read_section): Error when attempting to malloc
331 "(bfd_size_type) -1".
332 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
333 function_name. Bounds check reloc address. Formatting. Ensure
334 .stabstr zero terminated.
336 2018-09-18 Nick Clifton <nickc@redhat.com>
339 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
340 ELF section has contents and size larger than the file size.
342 2018-09-14 Maciej W. Rozycki <macro@mips.com>
345 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
346 (_bfd_mips_elf_linker_flags): Update prototype.
347 * elf32-mips.c (elf_backend_hide_symbol): New macro.
348 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
349 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
350 * elfxx-mips.c (mips_elf_link_hash_table): Add
351 `use_absolute_zero' and `gnu_target' members.
352 (mips_elf_record_global_got_symbol): Call
353 `_bfd_mips_elf_hide_symbol' rather than
354 `_bfd_elf_link_hash_hide_symbol'.
355 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
356 (mips_elf_obtain_contents): Reorder function.
357 (mips_elf_nullify_got_load): New function.
358 (mips_elf_calculate_relocation): Add `contents' parameter.
359 Nullify GOT loads or if it is not possible, then redirect GOT
360 relocations to the `__gnu_absolute_zero' symbol, for references
361 that are supposed to resolve to zero.
362 (mips_elf_define_absolute_zero): New function.
363 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
364 `mips_elf_calculate_relocation' for references made via the GOT
365 that are supposed to resolve to zero.
366 (_bfd_mips_elf_hide_symbol): New function.
367 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
368 set the `gnu_target' member of the MIPS hash table.
369 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
370 (_bfd_mips_post_process_headers): Use it.
372 2018-09-14 Maciej W. Rozycki <macro@mips.com>
374 * elfxx-mips.c (mips_elf_store_contents): New function...
375 (mips_elf_perform_relocation): ... factored out from here.
377 2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
379 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
381 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
383 2018-09-14 Alan Modra <amodra@gmail.com>
386 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
387 fields in debug sections when reloc is against an undefined symbol
388 and called from bfd_simple_get_relocated_section_contents or
390 * dwarf2.c (find_abstract_instance): Return true for zero offset
391 DW_FORM_ref_addr without returning values.
393 2018-09-06 Alan Modra <amodra@gmail.com>
396 * elf32-avr.c (elf_avr_special_sections): New.
397 (elf_backend_special_sections): Define.
399 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
401 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
402 error when an invalid relocation is passed; this is already done
403 by `_bfd_sparc_elf_info_to_howto_ptr'.
405 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
407 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
408 error when an invalid symbol index is retrieved in ELF64_R_SYM of
409 a relocation seen in an input file.
411 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
412 Alan Modra <amodra@gmail.com>
415 elf.c (copy_elf_program_header): When first segment contains
416 only the headers and SHT_NOBITS sections, use segment p_filesz
417 to calculate header and padding size. Use filepos of the first
420 2018-08-31 H.J. Lu <hongjiu.lu@intel.com>
423 * archures.c (bfd_arch_get_compatible): Allow an IR object with
424 unknown architecture.
426 2018-08-31 Alan Modra <amodra@gmail.com>
428 * elf64-ppc.c (num_relocs_for_offset): New function.
429 (emit_relocs_for_offset): New function.
430 (use_global_in_relocs): New function, split out from..
431 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
432 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
433 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
435 2018-08-31 Alan Modra <amodra@gmail.com>
437 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
438 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
439 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
441 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
442 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
443 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
444 * bfd-in2.h: Regenerate.
445 * libbfd.h: Regenerate.
447 2018-08-31 Alan Modra <amodra@gmail.com>
449 * elf64-ppc.c: Correct _notoc stub comments.
450 (ppc_build_one_stub): Simplify output of branch for notoc
451 long branch stub. Don't include label offset of 8 bytes in
452 "off" calculation for notoc plt stub. Don't emit insns to get pc.
453 (build_offset): Emit insns to get pc here instead.
454 (size_offset): Add 4 extra insns.
455 (plt_stub_size): Adjust for "off" and size_offset changes.
456 (ppc_size_one_stub): Rearrange code into a switch, duplicating
457 some to better match ppc_build_one_stub.
459 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
461 * archures.c (bfd_architecture): New machine
462 bfd_mach_mips_gs264e.
463 * bfd-in2.h (bfd_architecture): Likewise.
464 * cpu-mips.c (enum I_xxx): Likewise.
465 (arch_info_struct): Likewise.
466 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
468 (mips_set_isa_flags): Likewise.
469 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
470 bfd_mach_mips_gs464e extension.
472 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
474 * archures.c (bfd_architecture): New machine
475 bfd_mach_mips_gs464e.
476 * bfd-in2.h (bfd_architecture): Likewise.
477 * cpu-mips.c (enum I_xxx): Likewise.
478 (arch_info_struct): Likewise.
479 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
481 (mips_set_isa_flags): Likewise.
482 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
483 bfd_mach_mips_gs464 extension.
485 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
487 * archures.c (bfd_architecture): Rename
488 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
489 * bfd-in2.h (bfd_architecture): Likewise.
490 * cpu-mips.c (enum I_xxx): Likewise.
491 (arch_info_struct): Likewise.
492 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
493 (mips_set_isa_flags): Likewise.
494 (mips_mach_extensions): Likewise.
495 (bfd_mips_isa_ext_mach): Likewise.
496 (bfd_mips_isa_ext): Likewise.
497 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
499 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
501 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
503 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
505 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
506 isa_ext for infer ABI flags.
507 (print_mips_ases): Add Loongson EXT extension.
509 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
511 * elfxx-mips.c (print_mips_ases): Add CAM extension.
513 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
515 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
516 out the GNU_PROPERTY_X86_UINT32_VALID bit.
518 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
521 * elf.c (_bfd_elf_get_symbol_version_string): Return
522 _("<corrupt>") for corrupt symbol version info.
524 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
526 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
527 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
528 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
529 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
530 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
531 (_bfd_x86_elf_merge_gnu_properties): Likewise.
532 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
533 instead of X86_ISA_1_NEEDED.
534 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
535 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
536 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
537 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
538 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
540 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
542 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
543 GNU_PROPERTY_X86_UINT32_VALID bit.
544 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
545 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
547 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
550 * plugin.c (struct plugin_list_entry): New structure.
551 (plugin_list): New variable.
552 (try_load_plugin): Place opened plugins on a list. Ensure that
553 the refcount in the dynamic loader is kept at 1.
555 2018-08-23 Alan Modra <amodra@gmail.com>
557 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
560 2018-08-23 Nick Clifton <nickc@redhat.com>
562 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
563 code with an assertion.
565 2018-08-23 Nick Clifton <nickc@redhat.com>
568 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
569 it to prevent walking off the end of the table.
570 (coff_get_normalized_symtab): Pass internal_end pointer to
573 2018-08-23 Alan Modra <amodra@gmail.com>
575 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
576 unresolved_reloc on ppc_stub_plt_call_notoc.
578 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
581 * development.sh (experimental): New.
583 2018-08-22 Helge Deller <deller@gmx.de>
584 Nick Clifton <nickc@redhat.com>
586 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
587 the section type of the .PARISC.unwind section on 64-bit binaries
588 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
589 Add comment about the sh_entsize value.
591 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
594 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
595 stub's target, since it may have been changed after the layout.
597 2018-08-21 John Darington <john@darrington.wattle.id.au>
599 * elf32-s12z.c (opru18_reloc): New function.
600 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
602 2018-08-21 mephi42 <mephi42@gmail.com>
605 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
606 data is already considered filled.
608 2018-08-21 Alan Modra <amodra@gmail.com>
610 * elf64-ppc.c (HOW): Define.
612 (ppc64_elf_howto_raw): Use HOW to initialize entries.
613 * elf32-ppc.c (HOW): Define.
614 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
615 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
617 2018-08-21 Alan Modra <amodra@gmail.com>
619 * reloc.c (reloc_howto_type): Typedef.
620 (bfd_symbol): Delete forward declaration.
621 (struct reloc_howto_struct): Add "negate" field. Make "size",
622 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
623 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
624 Rearrange for better packing. Revise comments.
625 (HOWTO): Map to rearranged reloc_howto_struct.
626 (bfd_get_reloc_size): Delete now unused cases.
627 (read_reloc, write_reloc): Likewise.
628 (apply_reloc, _bfd_relocate_contents): Test howto->negate
629 rather than howto->size < 0 for negated relocation values.
630 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
631 signed/unsigned warning.
632 (xcoff_ppc_relocate_section): Delete "condition is always false"
634 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
635 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
637 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
638 size 16 for ALPHA_R_LINKAGE.
639 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
641 * bfd-in.h (reloc_howto_type): Delete.
642 * bfd-in2.h: Regenerate.
644 2018-08-21 Alan Modra <amodra@gmail.com>
646 * reloc.c (HOWTO): Revise comment.
647 (NEWHOWTO, HOWTO_PREPARE): Delete.
648 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
649 reloc_howto_struct with reloc_howto_type.
650 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
651 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
652 * elf-hppa.h (HOW): Define.
653 (elf_hppa_howto_table): Use it to simplify this table, correcting
654 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
655 R_PARISC_LTOFF_FPTR16DF.
656 * elf32-mep.c (MEPREL): Use HOWTO.
657 * bfd-in2.h: Regenerate.
659 2018-08-20 Alan Modra <amodra@gmail.com>
661 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
663 (mmo_init): Don't init valid_mmo_symbol_character_set.
665 2018-08-20 Alan Modra <amodra@gmail.com>
667 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
669 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
672 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
673 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
674 backend fixup_gnu_properties if it isn't NULL. Discard
675 .note.gnu.property section if all properties have been removed.
676 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
677 (elfNN_bed): Initialize fixup_gnu_properties.
678 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
680 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
682 (elf_backend_fixup_gnu_properties): New.
684 2018-08-16 Alan Modra <amodra@gmail.com>
686 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
689 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
692 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
693 (BFD32_LIBS_CFILES): Add elf-properties.c.
694 (BFD32_BACKENDS): Remove elf-properties.lo.
695 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
696 * configure.ac (elf): Remove elf-properties.lo.
697 * Makefile.in: Regenerated.
698 * configure: Likewise.
700 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
703 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
704 add X86_ISA_1_NEEDED property only if existing properties won't
707 2018-08-11 Alan Modra <amodra@gmail.com>
709 * reloc.c (bfd_get_reloc_size): Sort switch.
710 (read_reloc, write_reloc, apply_reloc): New functions.
711 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
712 (_bfd_relocate_contents): Use read_reloc and write_reloc.
713 (_bfd_clear_contents): Likewise.
715 2018-08-11 John Darrington <john@darrington.wattle.id.au>
717 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
718 (_bfd_clear_contents): Likewise.
719 (bfd_perform_relocation): Likewise.
720 (bfd_install_relocation): Likewise.
722 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
725 * elflink.c (bfd_elf_record_link_assignment): Always clear
726 h->verinfo.verdef when overriding a dynamic definition.
728 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
731 * elf-properties.c (elf_get_gnu_property_section_size): Always
732 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
733 (elf_write_gnu_properties): Likewise.
735 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
738 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
739 calling _bfd_elf_convert_gnu_property_size to convert
740 .note.gnu.property section size.
741 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
742 calling _bfd_elf_convert_gnu_properties to convert
743 .note.gnu.property section.
744 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
745 (_bfd_elf_convert_gnu_properties): Likewise.
746 * elf-properties.c (elf_get_gnu_property_section_size): New
748 (elf_write_gnu_properties): Likewise.
749 (_bfd_elf_convert_gnu_property_size): Likewise.
750 (_bfd_elf_convert_gnu_properties): Likewise.
751 (_bfd_elf_link_setup_gnu_properties): Use
752 elf_get_gnu_property_section_size and elf_write_gnu_properties.
754 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
757 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
758 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
759 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
760 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
761 GNU_PROPERTY_X86_ISA_1_USED, property.
763 2018-08-07 Alan Modra <amodra@gmail.com>
765 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
766 Add lr_restore, eh_size and eh_base.
767 (eh_advance, eh_advance_size): New functions.
768 (build_tls_get_addr_stub): Emit EH info for stub.
769 (ppc_build_one_stub): Likewise for _notoc stubs.
770 (ppc_size_one_stub): Size EH info for stub.
771 (group_sections): Init new map_stub fields.
772 (stub_eh_frame_size): Delete.
773 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
775 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
776 offset to stub section here..
777 (ppc64_elf_finish_dynamic_sections): ..rather than here.
779 2018-08-07 Alan Modra <amodra@gmail.com>
781 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
782 instruction of __tls_get_addr_opt stub.
783 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
784 dealing with __tls_get_addr_opt stub.
785 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
787 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
789 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
790 efalgs only when in/out exists.
791 (elf32_arc_section_from_shdr): Don't complain about 0x0c
792 section type. It is mwdt compiler specific.
794 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
796 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
798 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
800 * elf32-arc.c (arc_elf_merge_attributes): Handle
803 2018-08-05 Alan Modra <amodra@gmail.com>
805 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
806 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
807 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
808 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
809 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
810 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
811 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
812 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
813 ppc_stub_plt_call_both.
814 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
815 (build_offset, size_offset): New functions.
816 (plt_stub_size): Support plt_call_notoc and plt_call_both.
817 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
818 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
819 (ppc64_elf_size_stubs): Likewise, and new stubs.
820 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
821 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
822 * bfd-in2.h: Regenerate.
823 * libbfd.h: Regenerate.
825 2018-08-05 Alan Modra <amodra@gmail.com>
827 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
829 2018-08-02 Jim Wilson <jimw@sifive.com>
831 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
832 add SEC_LINKER_CREATED flag.
834 2018-08-01 Nick Clifton <nickc@redhat.com>
836 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
837 about potentially truncated strncpy operations.
838 (_bfd_xcoff_put_symbol_name): Likewise.
840 * elf32-avr.c (avr_stub_name): Check for a NULL return from
843 2018-08-01 Zenith <zenith432@users.sourceforge.net>
846 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
848 (try_claim): Always close the file descriptor at the end of the
850 (try_load_plugin): If a plugin has already been registered, then
851 skip the dlopen and onload steps and go straight to claiming the
852 file. If these is an error, close the plugin.
854 2018-08-01 Alan Modra <amodra@gmail.com>
856 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
857 (ppc_build_one_stub): Don't set stub_offset, instead assert that
858 it is sane. Don't adjust stub_offset for alignment. Adjust size
859 calculation. Use "targ" temp when calculating offsets.
860 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
861 calculating offsets. Adjust for alignment before setting
862 tls_get_addr_opt_bctrl.
864 2018-08-01 Alan Modra <amodra@gmail.com>
866 * po/SRC-POTFILES.in: Regenerate.
868 2018-07-30 Nick Clifton <nickc@redhat.com>
871 * elf32-sh.c (sh_elf_relocate_section): When processing
872 translation relocs, fail if the relocation offset is too small.
873 Replace BFD_ASSERTs with more helpful error messages.
875 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
877 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
878 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
879 * Makefile.in: Regenerated.
880 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
881 related bfd_mach defines.
882 (bfd_csky_arch): Declare.
883 (bfd_archures_list): Add C-SKY.
884 * bfd-in.h (elf32_csky_build_stubs): Declare.
885 (elf32_csky_size_stubs): Declare.
886 (elf32_csky_next_input_section: Declare.
887 (elf32_csky_setup_section_lists): Declare.
888 * bfd-in2.h: Regenerated.
889 * config.bfd: Add C-SKY.
890 * configure.ac: Likewise.
891 * configure: Regenerated.
892 * cpu-csky.c: New file.
893 * elf-bfd.h (enum elf_target_id): Add C-SKY.
894 * elf32-csky.c: New file.
895 * libbfd.h: Regenerated.
896 * reloc.c: Add C-SKY relocations.
897 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
898 (_bfd_target_vector): Add C-SKY target vector entries.
900 2018-07-27 John Darrington <john@darrington.wattle.id.au>
902 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
904 2018-07-27 John Darrington <john@darrington.wattle.id.au>
906 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
907 (bfd_get_24, bfd_put_24): New macros.
908 * bfd-in2.h: Regenerate.
910 2018-07-27 John Darrington <john@darrington.wattle.id.au>
912 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
914 2018-07-26 Alan Modra <amodra@gmail.com>
916 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
917 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
919 2018-07-25 Alan Modra <amodra@gmail.com>
921 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
922 Avoid trashing toff with added when used as a symbol index.
923 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
924 creating unnecessary fixups when relocatable.
926 2018-07-25 Alan Modra <amodra@gmail.com>
928 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
929 -Wstringop-truncation warning for gcc-8.0 too.
930 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
931 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
932 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
933 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
934 * elf64-s390.c (elf_s390_write_core_note): Likewise.
936 2018-07-24 Alan Modra <amodra@gmail.com>
939 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
940 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
942 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
944 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
945 relocation sections consistency check to always check both
946 .rela.dyn and .rela.plt when they exist. Rearrange variable
947 definition and assignment places.
949 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
951 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
952 relocations section for dynamic undefined weak symbols when
953 linking a shared object.
955 2018-07-23 Tom Tromey <tom@tromey.com>
957 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
959 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
961 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
962 cleanup for the case of a global symbol that binds locally. Also
963 install a value in the GOT slot in the case of a local symbol in
966 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
969 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
970 separate code program header is needed, make sure that the first
971 read-only PT_LOAD segment has no code by adding a
972 GNU_PROPERTY_X86_ISA_1_USED note.
974 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
975 Maciej W. Rozycki <macro@mips.com>
977 * elfxx-mips.c (print_mips_ases): Add MMI extension.
979 2018-07-20 Maciej W. Rozycki <macro@mips.com>
981 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
982 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
983 dynamic relocation section will be discarded from output.
984 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
985 the dynamic relocation section will be retained in output.
987 2018-07-18 Maciej W. Rozycki <macro@mips.com>
989 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
990 checks for defined weak symbols.
992 2018-07-17 Maciej W. Rozycki <macro@mips.com>
994 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
995 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
996 whether the symbol is absolute.
997 (nds32_elf_relax_lo12): Likewise.
998 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
999 (elfNN_aarch64_check_relocs): Likewise.
1000 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
1001 (bfd_xcoff_import_symbol): Likewise.
1002 (xcoff_write_global_symbol): Likewise.
1004 2018-07-17 Maciej W. Rozycki <macro@mips.com>
1006 * linker.c (bfd_is_abs_symbol): New macro.
1007 * bfd-in2.h: Regenerate.
1009 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1011 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
1012 (elfcore_write_ppc_ppr): Likewise.
1013 (elfcore_write_ppc_dscr): Likewise.
1014 (elfcore_write_ppc_ebb): Likewise.
1015 (elfcore_write_ppc_pmu): Likewise.
1016 (elfcore_write_ppc_tm_cgpr): Likewise.
1017 (elfcore_write_ppc_tm_cfpr): Likewise.
1018 (elfcore_write_ppc_tm_cvmx): Likewise.
1019 (elfcore_write_ppc_tm_cvsx): Likewise.
1020 (elfcore_write_ppc_tm_spr): Likewise.
1021 (elfcore_write_ppc_tm_ctar): Likewise.
1022 (elfcore_write_ppc_tm_cppr): Likewise.
1023 (elfcore_write_ppc_tm_cdscr): Likewise.
1024 * elf.c (elfcore_write_ppc_tar): New function.
1025 (elfcore_write_ppc_ppr): Likewise.
1026 (elfcore_write_ppc_dscr): Likewise.
1027 (elfcore_write_ppc_ebb): Likewise.
1028 (elfcore_write_ppc_pmu): Likewise.
1029 (elfcore_write_ppc_tm_cgpr): Likewise.
1030 (elfcore_write_ppc_tm_cfpr): Likewise.
1031 (elfcore_write_ppc_tm_cvmx): Likewise.
1032 (elfcore_write_ppc_tm_cvsx): Likewise.
1033 (elfcore_write_ppc_tm_spr): Likewise.
1034 (elfcore_write_ppc_tm_ctar): Likewise.
1035 (elfcore_write_ppc_tm_cppr): Likewise.
1036 (elfcore_write_ppc_tm_cdscr): Likewise.
1037 (elfcore_write_register_note): Call them.
1038 (elfcore_grok_ppc_tar): New function.
1039 (elfcore_grok_ppc_ppr): Likewise.
1040 (elfcore_grok_ppc_dscr): Likewise.
1041 (elfcore_grok_ppc_ebb): Likewise.
1042 (elfcore_grok_ppc_pmu): Likewise.
1043 (elfcore_grok_ppc_tm_cgpr): Likewise.
1044 (elfcore_grok_ppc_tm_cfpr): Likewise.
1045 (elfcore_grok_ppc_tm_cvmx): Likewise.
1046 (elfcore_grok_ppc_tm_cvsx): Likewise.
1047 (elfcore_grok_ppc_tm_spr): Likewise.
1048 (elfcore_grok_ppc_tm_ctar): Likewise.
1049 (elfcore_grok_ppc_tm_cppr): Likewise.
1050 (elfcore_grok_ppc_tm_cdscr): Likewise.
1051 (elfcore_grok_note): Call them.
1053 2018-07-11 Maciej W. Rozycki <macro@mips.com>
1055 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1056 than `!bfd_link_pic' in determining the dynamic symbol index.
1057 Avoid the index of -1.
1058 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
1059 moving `dyn' to the beginning of the function block.
1061 2018-07-11 Maciej W. Rozycki <macro@mips.com>
1062 Rich Felker <bugdal@aerifal.cx>
1065 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1066 than `bfd_link_pic' to determine whether dynamic relocations are
1068 (mips_elf_initialize_tls_slots): Likewise.
1070 2018-07-10 Maciej W. Rozycki <macro@mips.com>
1072 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
1073 to `remove_section'.
1075 2018-07-10 Alan Modra <amodra@gmail.com>
1077 * elf32-xgate.h: Delete.
1078 * elf32-xgate.c: Delete unnecessary forward declarations, add two
1079 that are now needed.
1080 (xgate_elf_bfd_link_hash_table_create)
1081 (xgate_elf_bfd_link_hash_table_free)
1082 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
1083 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
1084 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
1085 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
1086 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
1087 (elf32_xgate_post_process_headers): Delete.
1088 (elf32_xgate_backend_symbol_processing): New function.
1089 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
1090 (_bfd_xgate_elf_print_private_bfd_data): Make static.
1091 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
1092 (elf_backend_relocate_section, elf_backend_object_p)
1093 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
1094 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
1095 (bfd_elf32_bfd_link_hash_table_create)
1096 (bfd_elf32_bfd_set_private_flags)
1097 (xgate_stub_hash_lookup): Don't define.
1098 (elf_backend_symbol_processing): Define.
1099 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
1101 2018-07-09 Maciej W. Rozycki <macro@mips.com>
1103 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
1104 `->needs_lazy_stub' if the stubs output section is the absolute
1107 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
1110 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
1111 * configure: Regenerated.
1113 2018-07-09 Alan Modra <amodra@gmail.com>
1115 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
1116 _bfd_elf_post_process_headers.
1118 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
1120 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
1121 space for dynamic relocation for undefined weak symbol.
1122 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
1123 relocation for undefined weak symbols.
1124 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
1125 section for relocations against undefined weak symbols.
1127 2018-07-06 Alan Hayward <alan.hayward@arm.com>
1129 * elf.c (elfcore_grok_aarch_sve): New function.
1130 (elfcore_grok_note): Check for Aarch64 SVE.
1131 (elfcore_write_aarch_sve): New function.
1132 (elfcore_write_register_note): Check for Aarch64 SVE.
1133 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
1135 2018-07-06 Alan Modra <amodra@gmail.com>
1137 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
1138 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
1139 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1140 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1141 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
1142 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1143 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1145 2018-07-05 Jim Wilson <jimw@sifive.com>
1147 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
1148 (riscv64*-*-*): Likewise.
1149 (riscv-*-*): Add as an alias for riscv32*-*-*.
1151 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
1154 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
1155 ISA properties with empty bits.
1157 2018-07-05 Nick Clifton <nickc@redhat.com>
1159 * po/ru.po: Updated Russian translation.
1161 2018-07-05 Alan Modra <amodra@gmail.com>
1163 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
1164 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
1165 on mismatch. Remove "warning: " from messages. Track last bfd
1167 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
1168 _bfd_elf_ppc_merge_fp_attributes.
1169 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
1170 from _bfd_elf_ppc_merge_fp_attributes.
1172 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
1174 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
1175 * Makefile.in: Regenerated.
1177 2018-07-03 Alan Modra <amodra@gmail.com>
1179 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
1182 2018-07-03 Alan Modra <amodra@gmail.com>
1184 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
1185 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
1186 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
1187 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
1188 incompatible attribute.
1189 (ppc_elf_merge_obj_attributes): Likewise. Return
1190 _bfd_elf_merge_object_attributes result.
1191 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
1192 _bfd_elf_merge_object_attributes result.
1194 2018-07-03 Alan Modra <amodra@gmail.com>
1197 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
1198 in discarded sections.
1200 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1202 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
1203 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
1206 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1208 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
1209 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
1210 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
1211 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
1212 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
1213 R_MICROMIPS_PC23_S2 relocation entries.
1214 (micromips_elf64_howto_table_rela): Likewise.
1215 (micromips_reloc_map): Likewise.
1216 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
1217 (elf_micromips_howto_table_rela): Likewise.
1218 (micromips_reloc_map): Likewise.
1220 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
1223 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
1224 R_X86_64_converted_reloc_bit bit.
1226 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
1227 Tom Tromey <tom@tromey.com>
1231 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
1232 (bfd_mach_o_close_and_cleanup): Redefine.
1233 * archive.c (_bfd_unlink_from_archive_parent): New function,
1235 (_bfd_archive_close_and_cleanup): ..here.
1236 (bfd_generic_archive_p): Do not clear archive's format.
1237 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
1238 * libbfd.h: Regenerate.
1240 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1242 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
1243 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
1244 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
1245 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
1246 * bfd-in2.h: Regenerate.
1247 * cpu-arm.c (arch_info_struct): Add entries for above new
1248 bfd_mach_arm values.
1249 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
1250 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
1251 architectures. Force assert failure for any new Tag_CPU_arch value.
1253 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1255 * doc/bfdint.texi: Use command-line consistently when used in a
1257 * doc/bfdsumm.texi: Likewise.
1259 2018-06-29 Maciej W. Rozycki <macro@mips.com>
1261 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
1262 visibility check made for undefined weak symbols.
1264 2018-06-26 Nick Clifton <nickc@redhat.com>
1266 * po/uk.po: Updated Ukranian translation.
1268 2018-06-25 Nick Clifton <nickc@redhat.com>
1270 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
1271 for malloc returning NULL.
1272 (_bfd_aarch64_erratum_843419_fixup): Check for
1273 _bfd_aarch64_erratum_835769_stub_name returning NULL.
1275 2018-06-24 Nick Clifton <nickc@redhat.com>
1277 * po/bfd.pot: Regenerate.
1279 2018-06-24 Nick Clifton <nickc@redhat.com>
1281 * version.m4: Update version string to 2.31.51.
1282 * configure: Regenerate.
1284 2018-06-24 Nick Clifton <nickc@redhat.com>
1286 2.31 branch created.
1288 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1290 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
1291 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
1293 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1295 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
1296 EI_ABIVERSION setting together.
1298 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1300 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
1301 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
1302 (MIPS_LIBC_ABI_MAX): New enumeration constants.
1303 (_bfd_mips_post_process_headers): Use them in place of magic
1306 2018-06-21 Jim Wilson <jimw@sifive.com>
1308 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
1309 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
1311 2018-06-21 Alan Modra <amodra@gmail.com>
1313 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
1314 * doc/Makefile.in: Regenerate.
1316 2018-06-20 Renlin Li <renlin.li@arm.com>
1318 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
1319 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1320 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1321 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1322 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1323 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1324 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1325 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1326 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1328 2018-06-20 Nick Clifton <nickc@redhat.com>
1331 * opncls.c (get_build_id): Check for a negative or excessive data
1332 size in the build-id note.
1334 2018-06-20 Nick Clifton <nickc@redhat.com>
1337 * mach-o.c (cputype): New function.
1338 (cpusubtype): New function.
1339 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1340 values in the MACH-O file header.
1341 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1342 cpusubtype fields from the input bfd's mach-o header to the output
1344 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1345 Redefine to bfd_mach_o_bfd_print_private_data.
1346 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1348 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1351 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1352 `.got.plt' entry referred is in range.
1353 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1354 start. Replace the assertion used for that with a proper error
1357 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1359 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1362 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1364 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1365 (INCLUDES): Rename to ...
1366 (AM_CPPFLAGS): ... this.
1367 * configure.ac: Remove AC_PREREQ.
1368 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1369 info-in-builddir no-texinfo.tex.
1370 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1371 * doc/bfd.texinfo: Rename to ...
1372 * doc/bfd.texi: ... this.
1373 * Makefile.in: Re-generate.
1374 * aclocal.m4: Re-generate.
1375 * config.in: Re-generate.
1376 * configure: Re-generate.
1377 * doc/Makefile.in: Re-generate.
1379 2018-06-18 Mephi <mephi42@gmail.com>
1382 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1383 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1384 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1385 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1386 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1387 * bfd-in2.h: Regenerate.
1388 * libbfd.h: Regenerate.
1390 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1392 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1394 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1397 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1398 symbol version is base version.
1400 2018-06-14 Alan Modra <amodra@gmail.com>
1402 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1403 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1404 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1405 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1406 "dynamic_relocs" is not set.
1407 * elfxx-mips.c (count_section_dynsyms): Likewise.
1409 2018-06-14 Alan Modra <amodra@gmail.com>
1412 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1414 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1415 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1417 * elfxx-mips.c (print_mips_ases): Add CRC.
1419 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1422 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1423 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1424 __bss_start, _end and _edata in shared libraries.
1426 2018-06-07 Alan Modra <amodra@gmail.com>
1428 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1429 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1431 2018-06-05 Alan Modra <amodra@gmail.com>
1433 * bfd.c (struct bfd): Update comment on "where" usage.
1434 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1435 "iostream", and "where" from containing archive file. Return
1436 error on NULL iovec.
1437 (bfd_bread): Similarly, and return error attempted out of
1438 bounds archive element access.
1439 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1440 "where" from containing archive file.
1441 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1442 attempt to optimize away seeks. Don't paper over errors by
1444 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1445 (bfd_get_size): Likewise.
1446 (bfd_mmap): Operate on and use iovec of containing archive
1447 file. Return error on NULL iovec.
1448 * cache.c (bfd_cache_lookup_worker): Abort if working on
1449 archive element bfd.
1450 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1451 Don't ignore zero byte reads.
1452 (cache_bread): Look up FILE* in cache here. Error on NULL
1454 (cache_bwrite): Rename "where" to "from".
1455 (cache_bmmap): Don't handle archive elements.
1456 * coffcode.h (coff_slurp_line_table): Exit early on zero
1458 * bfd-in2.h: Regenerate.
1460 2018-06-05 Alan Modra <amodra@gmail.com>
1463 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1464 nested archives. Open file again for plugin.
1465 (try_claim): Don't save and restore file position. Close file
1467 * sysdep.h (O_BINARY): Define.
1469 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1471 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1472 (compute_fill_extra_space): Drop declaration. Rename function to
1473 xtensa_compute_fill_extra_space.
1474 (compute_ebb_actions, remove_dead_literal): Update references to
1475 compute_fill_extra_space.
1477 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1479 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1481 (xtensa_add_names): New function.
1482 (xtensa_property_section_name): Add new parameter
1483 separate_sections, use it to choose property section name.
1484 (xtensa_get_separate_property_section): New function.
1485 (xtensa_get_property_section): Invoke
1486 xtensa_get_separate_property_section to get individual property
1487 section if it exists, common property section otherwise.
1488 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1489 to xtensa_property_section_name.
1491 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1494 * bfd-in.h: Include "diagnostics.h".
1495 * bfd-in2.h: Regenerated.
1496 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1497 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1498 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1499 -Wstringop-truncation.
1500 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1501 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1502 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1503 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1504 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1506 2018-06-03 Jim Wilson <jimw@sifive.com>
1509 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1510 for and handle an undefined weak with no PLT.
1513 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1514 to code that ignores duplicate symbols.
1516 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1518 * version.m4: Bump version to 2.30.52
1519 * configure: Regenerated.
1521 2018-06-01 Alan Modra <amodra@gmail.com>
1523 * bfd.c (_bfd_error_handler): Arrange for this function to be
1524 declared in bfd-in2.h.
1525 * libbfd-in.h (_bfd_error_handler): Don't declare.
1526 * libbfd.h: Regenerate.
1527 * bfd-in2.h: Regenerate.
1529 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1531 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1532 This is needed to generate UEFI application image files from ELFs.
1534 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1536 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1537 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1538 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1539 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1540 (elf_i386_lazy_ibt_plt): Likewise.
1541 (elf_i386_nacl_plt): Likewise.
1542 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1543 (elf_x86_64_tlsdesc_plt_entry): This.
1544 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1545 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1546 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1547 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1548 (elf_x86_64_lazy_bnd_plt): Likewise.
1549 (elf_x86_64_lazy_ibt_plt): Likewise.
1550 (elf_x32_lazy_ibt_plt): Likewise.
1551 (elf_x86_64_nacl_plt): Likewise.
1552 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1553 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1554 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1555 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1556 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1557 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1558 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1559 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1560 (elf_x86_non_lazy_plt_layout): Update comments.
1561 (elf_x86_plt_layout): Likewise.
1563 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1567 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1568 (elf_backend_add_symbol_hook): Likewise.
1569 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1570 (elf_backend_add_symbol_hook): Likewise.
1571 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1572 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1573 (elf_backend_add_symbol_hook): Likewise.
1574 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1575 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1576 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1577 (elf_backend_add_symbol_hook): Likewise.
1578 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1580 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1581 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1582 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1583 * elflink.c (elf_link_add_object_symbols): Set
1584 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1586 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1589 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1590 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1591 Extracted from _bfd_elf_link_assign_sym_version.
1592 (_bfd_elf_link_hide_sym_by_version): New function.
1593 (_bfd_elf_link_assign_sym_version): Use
1594 _bfd_elf_link_hide_versioned_symbol.
1595 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1596 _bfd_elf_link_hide_sym_by_version instead of
1597 bfd_hide_sym_by_version. Don't check unversioned symbol.
1599 2018-05-25 Alan Modra <amodra@gmail.com>
1601 * Makefile.in: Regenerate.
1602 * po/SRC-POTFILES.in: Regenerate.
1604 2018-05-25 Alan Modra <amodra@gmail.com>
1606 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1607 * configure: Regenerate.
1609 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1611 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1614 2018-05-22 Alan Modra <amodra@gmail.com>
1617 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1619 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1621 (final_link_relocate): Revert last change.
1623 2018-05-22 Alan Modra <amodra@gmail.com>
1626 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1627 stubs in non-alloc sections.
1629 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1632 * aout-target.h (MY_bfd_link_hide_symbol): New.
1633 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1634 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1635 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1636 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1637 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1638 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1639 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1640 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1641 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1642 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1643 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1644 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1645 (bfd_link_hide_symbol): Likewise.
1646 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1647 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1648 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1649 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1650 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1651 * som.c (som_bfd_link_hide_symbol): Likewise.
1652 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1653 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1654 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1655 (alpha_vms_bfd_link_hide_symbol): Likewise.
1656 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1657 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1658 _bfd_generic_link_hide_symbol.
1659 (rs6000_xcoff64_aix_vec): Likewise.
1660 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1661 local symbol dynamic.
1662 (_bfd_elf_link_hide_symbol): New function.
1663 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1664 check root.ldscript_def.
1665 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1666 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1667 * bfd-in2.h: Regenerated.
1668 * libbfd.h: Likewise.
1670 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1673 * elf.c (setup_group): Mark section in a section group with
1676 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1679 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1680 set eh->local_ref to 1 if a symbol is versioned and there is a
1683 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1685 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1688 2018-05-18 Jim Wilson <jimw@sifive.com>
1690 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1691 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1692 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1693 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1694 (riscv_elf_finish_dynamic_symbol): Likewise.
1696 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1698 * Makefile.am: Add s12z files.
1699 * Makefile.in: Regenerate.
1700 * archures.c: Add bfd_s12z_arch.
1701 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1702 * bfd-in2.h: Regenerate.
1703 * config.bfd: Add s12z target.
1704 * configure.ac: Add s12z target.
1705 * configure: Regenerate.
1706 * cpu-s12z.c: New file.
1707 * elf32-s12z.c: New file.
1708 * libbfd.c (bfd_putb24): New function.
1709 (bfd_putl24): New function.
1710 * libbfd.h: Regenerate.
1711 * reloc.c: Add s12z relocations.
1712 (bfd_get_reloc_size): Handle size 5 relocs.
1713 * targets.c: Add s12z_elf32_vec.
1715 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1718 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1720 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1721 set eh->local_ref to 1 for linker defined symbols.
1723 2018-05-18 Alan Modra <amodra@gmail.com>
1726 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1727 don't point at other SHT_GROUP sections. Set shdr corresponding
1728 to invalid entry, to NULL rather than section 0. Identify
1729 SHT_GROUP section index when reporting an error. Cope with NULL
1732 2018-05-18 Alan Modra <amodra@gmail.com>
1734 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1735 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1737 * libbfd.h: Regenerate.
1738 * configure: Regenerate.
1739 * config.in: Regenerate.
1741 2018-05-18 Alan Modra <amodra@gmail.com>
1743 * libbfd-in.h: Add include guard.
1744 * libcoff-in.h: Likewise.
1745 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1746 * doc/Makefile.in: Regenerate.
1747 * libbfd.h: Regenerate.
1748 * libcoff.h: Regenerate.
1750 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1752 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1754 2018-05-16 Alan Modra <amodra@gmail.com>
1757 * format.c (struct bfd_preserve): Add section_id.
1758 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1760 (bfd_reinit): Set _bfd_section_id.
1761 (bfd_check_format_matches): Put all matches of any priority into
1762 matching_vector. Save initial section id and start each attempted
1763 match at that section id.
1764 * libbfd-in.h (_bfd_section_id): Declare.
1765 * section.c (_bfd_section_id): Rename from section_id and make
1766 global. Adjust uses.
1767 (bfd_get_next_section_id): Delete.
1768 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1769 bfd_get_section_id with _bfd_section_id.
1770 * libbfd.h: Regenerate.
1771 * bfd-in2.h: Regenerate.
1773 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1775 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1776 of the aux structure are initialised.
1778 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1780 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1782 2018-05-15 Nick Clifton <nickc@redhat.com>
1784 * po/pt.po: New Portuguese translation.
1785 * configure.ac (ALL_LINGUAS): Add pt.
1786 * configure: Regenerate.
1788 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1791 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1792 an error on IFUNC pointer defined in PDE.
1793 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1794 _bfd_x86_elf_link_fixup_ifunc_symbol.
1795 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1796 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1798 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1800 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1803 * elfxx-x86.c (elf_x86_linker_defined): New function.
1804 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1805 _end and _edata locally defined within executables.
1807 2018-05-12 Alan Modra <amodra@gmail.com>
1810 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1811 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1812 Instead make matching_lma and suggested_lma pointers to the
1813 sections. Align section vma and lma calculated from segment.
1814 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1815 test. Try to handle alignment padding before first section by
1816 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1818 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1820 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1821 conformant to TI ABI.
1822 (pru_elf32_relax_section): Likewise.
1823 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1824 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1825 (pru_elf32_pmem_relocate): Trap - should not get here.
1826 (pru_elf32_relocate_section): Add support for REL relocations.
1827 (elf_info_to_howto_rel): Enable REL.
1828 (elf_backend_may_use_rel_p): Likewise.
1829 (elf_backend_may_use_rela_p): Likewise.
1830 (elf_backend_default_use_rela_p): Likewise.
1832 2018-05-09 Alan Modra <amodra@gmail.com>
1835 * peXXigen.c (pe_print_edata): Correct minimum size.
1837 2018-05-09 Alan Modra <amodra@gmail.com>
1840 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1842 2018-05-08 Nick Clifton <nickc@redhat.com>
1845 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1847 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1848 attribute section is larger than the size of the file.
1850 2018-05-07 Alan Modra <amodra@gmail.com>
1852 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1853 strncmp when checking for ".bf" special symbol.
1854 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1855 section name a char array, remove sentinal known_sections entry,
1856 and adjust loop over known_sections to suit. Use memcmp rather
1859 2018-05-04 Alan Modra <amodra@gmail.com>
1861 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1862 (struct elf_external_linux_prpsinfo32_ugid16),
1863 (struct elf_external_linux_prpsinfo64_ugid32),
1864 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1865 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1867 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1869 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1871 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1872 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1873 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1874 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1875 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1877 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1878 false positive gcc-8 warning.
1879 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1881 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1883 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1884 of arguments when warning about different long double types.
1886 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1888 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1889 (elf_backend_fixup_symbol): New macro.
1890 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1892 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1894 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1896 * Makefile.am: Added NFP files to build.
1897 * archures.c: Added bfd_arch_nfp
1898 * config.bfd: Added NFP support.
1899 * configure.ac: Added NFP support.
1900 * cpu-nfp.c: New, for NFP support.
1901 * elf-bfd.h: Added elf_section_info()
1902 * elf64-nfp.c: New, for NFP support.
1903 * po/SRC-POTFILES.in: Added NFP source files.
1904 * targets.c: Added nfp_elf64_vec
1905 * bfd-in2.h: Regenerate.
1906 * Makefile.in: Regenerate.
1907 * configure: Regenerate.
1909 2018-04-27 Alan Modra <amodra@gmail.com>
1911 * bfd-in2.h: Regenerate.
1912 * libbfd.h: Regenerate.
1914 2018-04-27 Alan Modra <amodra@gmail.com>
1918 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1920 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1922 2018-04-26 Pedro Alves <palves@redhat.com>
1924 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1925 ifunc and non-ifunc symbols duplicates.
1927 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1928 Mickaël Guêné <mickael.guene@st.com>
1930 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1931 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1932 (elf32_arm_populate_plt_entry): Likewise.
1933 (elf32_arm_output_plt_map_1): Likewise.
1934 (elf32_arm_output_arch_local_syms): Likewise.
1936 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1937 Mickaël Guêné <mickael.guene@st.com>
1939 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1940 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1942 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1943 Mickaël Guêné <mickael.guene@st.com>
1945 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1948 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1949 Mickaël Guêné <mickael.guene@st.com>
1951 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1952 (elf32_arm_always_size_sections): Create stack segment.
1954 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1955 Mickaël Guêné <mickael.guene@st.com>
1957 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1958 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1960 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1961 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1962 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1963 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1964 (struct elf32_arm_link_hash_table): Update comment.
1965 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1966 (IS_ARM_TLS_RELOC): Likewise.
1967 (elf32_arm_check_relocs): Likewise.
1968 (allocate_dynrelocs_for_symbol): Likewise.
1969 (elf32_arm_size_dynamic_sections): Update comment.
1970 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1971 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1973 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1974 Mickaël Guêné <mickael.guene@st.com>
1976 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1977 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1978 (elf32_arm_allocate_plt_entry): Likewise.
1979 (elf32_arm_populate_plt_entry): Likewise.
1980 (elf32_arm_output_plt_map_1): Likewise.
1982 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1983 Mickaël Guêné <mickael.guene@st.com>
1985 * elf32-arm.c (struct fdpic_local): New.
1986 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1987 (elf32_arm_local_fdpic_cnts): New.
1988 (struct fdpic_global): New.
1989 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1990 (elf32_arm_link_hash_table): Add srofixup field.
1991 (arm_elf_add_rofixup): New.
1992 (arm_elf_fill_funcdesc): New.
1993 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1994 (elf32_arm_allocate_local_sym_info): Likewise.
1995 (create_got_section): Create .rofixup section.
1996 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1997 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1998 (elf32_arm_final_link_relocate): Likewise.
1999 (elf32_arm_check_relocs): Likewise.
2000 (allocate_dynrelocs_for_symbol): Likewise.
2001 (elf32_arm_size_dynamic_sections): Likewise.
2002 (elf32_arm_finish_dynamic_sections): Likewise.
2003 (elf32_arm_output_arch_local_syms): Likewise.
2004 (elf32_arm_fdpic_omit_section_dynsym): New.
2006 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2007 Mickaël Guêné <mickael.guene@st.com>
2009 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
2010 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
2011 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
2012 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
2013 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
2014 (elf32_arm_howto_from_type): Take new members of
2015 elf32_arm_howto_table_2 into account.
2016 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
2017 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
2018 BFD_RELOC_ARM_FUNCDESC_VALUE.
2019 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
2020 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
2021 BFD_RELOC_ARM_FUNCDESC_VALUE.
2023 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2024 Mickaël Guêné <mickael.guene@st.com>
2026 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
2027 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
2028 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
2029 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
2031 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2032 Mickaël Guêné <mickael.guene@st.com>
2034 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
2035 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
2036 arm*-*-uclinuxfdpiceabi.
2037 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
2038 arm_elf32_fdpic_le_vec.
2039 * configure: Regenerate.
2040 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
2041 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
2042 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
2043 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
2044 (elf32_arm_fdpic_link_hash_table_create): New.
2045 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
2046 arm_elf32_fdpic_le_vec.
2048 2018-04-25 Alan Modra <amodra@gmail.com>
2050 * elf-linux-core.h: Disable gcc-8 string truncation warning.
2051 * elf.c (elfcore_write_prpsinfo): Likewise.
2053 2018-04-25 Alan Modra <amodra@gmail.com>
2055 * Makefile.am: Remove arm-aout and arm-coff support.
2056 * config.bfd: Likewise.
2057 * configure.ac: Likewise.
2058 * targets.c: Likewise.
2059 * aout-arm.c: Delete.
2060 * armnetbsd.c: Delete.
2062 * Makefile.in: Regenerate.
2063 * configure: Regenerate.
2064 * po/SRC-POTFILES.in: Regenerate.
2066 2018-04-24 Nick Clifton <nickc@redhat.com>
2069 * elf.c (ignore_section_sym): Check for the output_section pointer
2070 being NULL before dereferencing it.
2073 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
2074 a negative PE_DEBUG_DATA size before iterating over the debug data.
2076 2018-04-23 Alan Modra <amodra@gmail.com>
2078 * elf-linux-core.h: Revert last change.
2081 2018-04-23 Nick Clifton <nickc@redhat.com>
2084 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2085 the end of the string table, and zero it.
2087 2018-04-23 Alan Modra <amodra@gmail.com>
2089 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
2090 gcc-8 string truncation warning.
2091 (swap_linux_prpsinfo32_ugid16_out): Likewise.
2092 (swap_linux_prpsinfo64_ugid32_out): Likewise.
2093 (swap_linux_prpsinfo64_ugid16_out): Likewise.
2094 * elf.c (elfcore_write_prpsinfo): Likewise.
2096 2018-04-23 Nick Clifton <nickc@redhat.com>
2099 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2100 the end of the string table, and zero it.
2102 2018-04-20 Alan Modra <amodra@gmail.com>
2105 * elf32-hppa.c (got_relocs_needed): Add extra param to special
2106 case both dtprel and tprel relocs.
2107 (allocate_dynrelocs): Adjust conditions for got relocs.
2108 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
2109 Emit dynamic relocs on TLS GOT entries for shared libraries,
2110 not when pic. Omit dynamic reloc on dtprel entry when local,
2111 and on tprel entry when local and executable.
2113 2018-04-19 Alan Modra <amodra@gmail.com>
2116 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
2117 (hppa_type_of_stub): Don't return a long branch stub for
2118 symbols other than those defined statically.
2120 2018-04-19 Alan Modra <amodra@gmail.com>
2122 * Makefile.am: Revert 2018-04-18 coff-mips changes.
2123 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
2124 to selvecs for mips targets change 2018-04-18.
2125 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
2126 and mips_ecoff_bele_vec.
2127 * targets.c: Likewise.
2128 * coff-mips.c: Resurrect.
2129 * Makefile.in: Regenerate.
2130 * configure: Regenerate.
2131 * po/SRC-POTFILES.in: Regenerate.
2133 2018-04-18 Alan Modra <amodra@gmail.com>
2135 * Makefile.am: Remove mips aout and coff support.
2136 * config.bfd: Likewise.
2137 * configure.ac: Likewise.
2138 * targets.c: Likewise.
2139 * coff-mips.c: Delete
2142 * pei-mips.c: Delete
2143 * Makefile.in: Regenerate.
2144 * configure: Regenerate.
2145 * po/SRC-POTFILES.in: Regenerate.
2147 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2149 * elf32-i386.c (elf32_bed): Define before including
2151 * elf64-x86-64.c (elf64_bed): Define before including
2153 (elf32_bed): Define before including "elf32-target.h".
2155 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2158 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
2159 normal input file with compatible relocation.
2161 2018-04-18 Alan Modra <amodra@gmail.com>
2163 * Makefile.am: Remove support for assorted i386 aout and coff targets.
2164 * config.bfd: Likewise.
2165 * configure.ac: Likewise.
2166 * doc/bfdint.texi: Likewise.
2167 * targets.c: Likewise.
2168 * freebsd.h: Delete.
2169 * i386dynix.c: Delete.
2170 * i386freebsd.c: Delete.
2171 * i386linux.c: Delete.
2172 * i386mach3.c: Delete.
2173 * i386netbsd.c: Delete.
2174 * i386os9k.c: Delete.
2175 * Makefile.in: Regenerate.
2176 * configure: Regenerate.
2177 * po/SRC-POTFILES.in: Regenerate.
2179 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
2181 Microblaze Target: PIC data text relative
2183 * bfd/reloc.c (2 new BFD relocations):
2184 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
2185 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
2186 * bfd/bfd-in2.h: Regenerate
2187 * bfd/libbfd.h: Regenerate
2188 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
2189 new relocs and handle them in both relocate and relax functions.
2190 (microblaze_elf_reloc_type_lookup): add mapping between for new
2192 (microblaze_elf_relocate_section): Handle new relocs in case of
2194 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
2196 2018-04-17 Nick Clifton <nickc@redhat.com>
2199 * aoutx.h (find_nearest_line): Check that the symbol name exists
2200 and is long enough, before attempting to see if it is for a .o
2202 * hash.c (bfd_hash_hash): Add an assertion that the string is not
2204 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
2206 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
2210 * dwarf2.c (concat_filename): Check for a NULL table pointer.
2212 2018-04-16 Nick Clifton <nickc@redhat.com>
2215 * coffgen.c (coff_pointerize_aux): Check for an out of range
2218 2018-04-16 Alan Modra <amodra@gmail.com>
2220 * Makefile.am: Remove arm-epoc-pe support.
2221 * coff-arm.c: Likewise.
2222 * config.bfd: Likewise.
2223 * configure.ac: Likewise.
2224 * targets.c: Likewise.
2225 * epoc-pe-arm.c: Delete.
2226 * epoc-pei-arm.c: Delete.
2227 * Makefile.in: Regenerate.
2228 * configure: Regenerate.
2229 * po/SRC-POTFILES.in: Regenerate.
2231 2018-04-16 Alan Modra <amodra@gmail.com>
2233 * Makefile.am: Remove sparc-aout and sparc-coff support.
2234 * config.bfd: Likewise.
2235 * configure.ac: Likewise.
2236 * targets.c: Likewise.
2237 * aout-sparcle.c: Delete.
2239 * cf-sparclynx.c: Delete.
2240 * coff-sparc.c: Delete.
2242 * sparclinux.c: Delete.
2243 * sparclynx.c: Delete.
2244 * sparcnetbsd.c: Delete.
2246 * Makefile.in: Regenerate.
2247 * configure: Regenerate.
2248 * po/SRC-POTFILES.in: Regenerate.
2250 2018-04-16 Alan Modra <amodra@gmail.com>
2252 * Makefile.am: Remove m68k-aout and m68k-coff support.
2253 * aoutf1.h: Likewise.
2254 * aoutx.h: Likewise.
2255 * archive.c: Likewise.
2256 * bfd-in.h: Likewise.
2258 * coffcode.h: Likewise.
2259 * coffswap.h: Likewise.
2260 * config.bfd: Likewise.
2261 * configure.ac: Likewise.
2262 * configure.host: Likewise.
2263 * doc/bfd.texinfo: Likewise.
2264 * doc/bfdint.texi: Likewise.
2265 * freebsd.h: Likewise.
2266 * gen-aout.c: Likewise.
2267 * hpux-core.c: Likewise.
2268 * libaout.h: Likewise.
2269 * libbfd-in.h: Likewise.
2270 * pdp11.c: Likewise.
2271 * peicode.h: Likewise.
2272 * riscix.c: Likewise.
2273 * targets.c: Likewise.
2275 * coff-apollo.c: Delete.
2276 * coff-aux.c: Delete.
2277 * coff-m68k.c: Delete.
2278 * coff-svm68k.c: Delete.
2279 * coff-u68k.c: Delete.
2280 * hosts/delta68.h: Delete.
2281 * hosts/hp300bsd.h: Delete.
2282 * hosts/m68kaux.h: Delete.
2283 * hosts/news.h: Delete.
2284 * hp300bsd.c: Delete.
2285 * hp300hpux.c: Delete.
2286 * liboasys.h: Delete.
2287 * m68k4knetbsd.c: Delete.
2288 * m68klinux.c: Delete.
2289 * m68knetbsd.c: Delete.
2291 * versados.c: Delete.
2292 * Makefile.in: Regenerate.
2293 * bfd-in2.h: Regenerate.
2294 * configure: Regenerate.
2295 * libbfd.h: Regenerate.
2296 * po/SRC-POTFILES.in: Regenerate.
2298 2018-04-16 Alan Modra <amodra@gmail.com>
2300 * Makefile.am: Remove sh5 and sh64 support.
2301 * archures.c: Likewise.
2302 * config.bfd: Likewise.
2303 * configure.ac: Likewise.
2304 * cpu-sh.c: Likewise.
2305 * elf32-sh-relocs.h: Likewise.
2306 * elf32-sh.c: Likewise.
2307 * targets.c: Likewise.
2308 * elf32-sh64-com.c: Delete.
2309 * elf32-sh64.c: Delete.
2310 * elf32-sh64.h: Delete.
2311 * elf64-sh64.c: Delete.
2312 * Makefile.in: Regenerate.
2313 * bfd-in2.h: Regenerate.
2314 * configure: Regenerate.
2315 * po/SRC-POTFILES.in: Regenerate.
2317 2018-04-16 Alan Modra <amodra@gmail.com>
2319 * Makefile.am: Remove sh-symbianelf support.
2320 * config.bfd: Likewise.
2321 * configure.ac: Likewise.
2322 * targets.c: Likewise.
2323 * elf32-sh-symbian.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 vax-bsd and vax-ultrix support.
2331 * config.bfd: Likewise.
2332 * configure.ac: Likewise.
2333 * targets.c: Likewise.
2335 * Makefile.in: Regenerate.
2336 * configure: Regenerate.
2337 * po/SRC-POTFILES.in: Regenerate.
2339 2018-04-16 Alan Modra <amodra@gmail.com>
2341 * Makefile.am: Remove w65 support.
2342 * archures.c: Likewise.
2343 * coffcode.h: Likewise.
2344 * config.bfd: Likewise.
2345 * configure.ac: Likewise.
2346 * targets.c: Likewise.
2347 * coff-w65.c: Delete.
2348 * cpu-w65.c: Delete.
2349 * Makefile.in: Regenerate.
2350 * bfd-in2.h: Regenerate.
2351 * configure: Regenerate.
2352 * po/SRC-POTFILES.in: Regenerate.
2354 2018-04-16 Alan Modra <amodra@gmail.com>
2356 * Makefile.am: Remove we32k support.
2357 * archures.c: Likewise.
2358 * coffcode.h: Likewise.
2359 * config.bfd: Likewise.
2360 * configure.ac: Likewise.
2361 * targets.c: Likewise.
2362 * coff-we32k.c: Delete.
2363 * cpu-we32k.c: Delete.
2364 * Makefile.in: Regenerate.
2365 * bfd-in2.h: Regenerate.
2366 * configure: Regenerate.
2367 * po/SRC-POTFILES.in: Regenerate.
2369 2018-04-16 Alan Modra <amodra@gmail.com>
2371 * Makefile.am: Remove m88k support.
2372 * aoutx.h: Likewise.
2373 * archures.c: Likewise.
2374 * coffcode.h: Likewise.
2375 * coffswap.h: Likewise.
2376 * config.bfd: Likewise.
2377 * configure.ac: Likewise.
2378 * cpu-ns32k.c: Likewise.
2379 * elf32-nds32.c: Likewise.
2380 * mach-o.c: Likewise.
2381 * netbsd-core.c: Likewise.
2382 * reloc.c: Likewise.
2383 * targets.c: Likewise.
2384 * coff-m88k.c: Delete.
2385 * cpu-m88k.c: Delete.
2386 * elf32-m88k.c: Delete.
2387 * hosts/m88kmach3.h: Delete.
2388 * m88kmach3.c: Delete.
2389 * m88kopenbsd.c: Delete.
2390 * Makefile.in: Regenerate.
2391 * bfd-in2.h: Regenerate.
2392 * configure: Regenerate.
2393 * po/SRC-POTFILES.in: Regenerate.
2395 2018-04-16 Alan Modra <amodra@gmail.com>
2397 * Makefile.am: Remove i370 support.
2398 * archures.c: Likewise.
2399 * config.bfd: Likewise.
2400 * configure.ac: Likewise.
2401 * targets.c: Likewise.
2402 * cpu-i370.c: Delete.
2403 * elf32-i370.c: Delete.
2404 * Makefile.in: Regenerate.
2405 * bfd-in2.h: Regenerate.
2406 * configure: Regenerate.
2407 * po/SRC-POTFILES.in: Regenerate.
2409 2018-04-16 Alan Modra <amodra@gmail.com>
2411 * Makefile.am: Remove h8500 support.
2412 * archures.c: Likewise.
2413 * coffcode.h: Likewise.
2414 * config.bfd: Likewise.
2415 * configure.ac: Likewise.
2416 * targets.c: Likewise.
2417 * coff-h8500.c: Delete.
2418 * cpu-h8500.c: Delete.
2419 * Makefile.in: Regenerate.
2420 * bfd-in2.h: Regenerate.
2421 * configure: Regenerate.
2422 * po/SRC-POTFILES.in: Regenerate.
2424 2018-04-16 Alan Modra <amodra@gmail.com>
2426 * Makefile.am: Remove h8300-coff support.
2427 * coffcode.h: Likewise.
2428 * config.bfd: Likewise.
2429 * configure.ac: Likewise.
2430 * reloc16.c: Likewise.
2431 * targets.c: Likewise.
2432 * coff-h8300.c: Delete.
2433 * Makefile.in: Regenerate.
2434 * configure: Regenerate.
2435 * po/SRC-POTFILES.in: Regenerate.
2437 2018-04-16 Alan Modra <amodra@gmail.com>
2439 * Makefile.am: Remove IEEE 695 support.
2440 * archures.c: Likewise.
2442 * config.bfd: Likewise.
2443 * configure.ac: Likewise.
2444 * doc/bfd.texinfo: Likewise.
2445 * doc/bfdint.texi: Likewise.
2446 * doc/bfdsumm.texi: Likewise.
2447 * section.c: Likewise.
2448 * targets.c: Likewise.
2450 * libieee.h: Delete.
2451 * Makefile.in: Regenerate.
2452 * bfd-in2.h: Regenerate.
2453 * configure: Regenerate.
2454 * po/SRC-POTFILES.in: Regenerate.
2456 2018-04-16 Alan Modra <amodra@gmail.com>
2458 * config.bfd: Remove tandem support.
2460 2018-04-16 Alan Modra <amodra@gmail.com>
2462 * Makefile.am: Remove newsos3 support.
2463 * aoutx.h: Likewise.
2464 * config.bfd: Likewise.
2465 * configure.ac: Likewise.
2466 * targets.c: Likewise.
2467 * newsos3.c: Delete.
2468 * Makefile.in: Regenerate.
2469 * configure: Regenerate.
2470 * po/SRC-POTFILES.in: Regenerate.
2472 2018-04-16 Alan Modra <amodra@gmail.com>
2474 * Makefile.am: Remove netware support.
2475 * bfd-in.h: Likewise.
2477 * config.bfd: Likewise.
2478 * configure.ac: Likewise.
2479 * doc/bfdint.texi: Likewise.
2480 * ecoff.c: Likewise.
2481 * targets.c: Likewise.
2483 * nlm-target.h: Delete.
2485 * nlm32-alpha.c: Delete.
2486 * nlm32-i386.c: Delete.
2487 * nlm32-ppc.c: Delete.
2488 * nlm32-sparc.c: Delete.
2491 * nlmcode.h: Delete.
2492 * nlmswap.h: Delete.
2493 * Makefile.in: Regenerate.
2494 * bfd-in2.h: Regenerate.
2495 * configure: Regenerate.
2496 * po/SRC-POTFILES.in: Regenerate.
2498 2018-04-16 Alan Modra <amodra@gmail.com>
2500 * archures.c: Remove tahoe support.
2501 * config.bfd: Likewise.
2502 * configure.ac: Likewise.
2503 * hosts/tahoe.h: Delete.
2504 * bfd-in2.h: Regenerate.
2505 * configure: Regenerate.
2507 2018-04-14 Alan Modra <amodra@gmail.com>
2509 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2510 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2512 (elfNN_bed): Init relropagesize.
2513 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2514 select relropagesize.
2515 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2516 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2517 (ELF_MINPAGESIZE): Don't define.
2518 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2519 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2520 * bfd-in2.h: Regenerate.
2522 2018-04-14 Alan Modra <amodra@gmail.com>
2524 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2525 on __QNXTARGET__ define.
2527 2018-04-14 Alan Modra <amodra@gmail.com>
2529 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2532 2018-04-11 Alan Modra <amodra@gmail.com>
2534 * aout-adobe.c: Delete.
2536 * coff-i860.c: Delete.
2537 * coff-i960.c: Delete.
2538 * cpu-i860.c: Delete.
2539 * cpu-i960.c: Delete.
2540 * elf32-i860.c: Delete.
2541 * elf32-i960.c: Delete.
2542 * hosts/i860mach3.h: Delete.
2543 * Makefile.am: Remove i860, i960, bout, and adobe support.
2544 * archures.c: Remove i860 and i960 support.
2545 * coffcode.h: Likewise.
2546 * reloc.c: Likewise.
2547 * aoutx.h: Comment updates.
2548 * archive.c: Remove BOUT and i960 support.
2549 * bfd.c: Remove BOUT support.
2550 * coffswap.h: Remove i960 support.
2551 * config.bfd: Remove i860, i960 and adobe targets.
2552 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2553 * targets.c: Likewise.
2554 * ieee.c: Remove i960 support.
2555 * mach-o.c: Remove i860 support.
2556 * Makefile.in: Regenerate.
2557 * bfd-in2.h: Regenerate.
2558 * configure: Regenerate.
2559 * libbfd.h: Regenerate.
2560 * po/SRC-POTFILES.in: Regenerate.
2562 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2564 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2565 in the BFD symbol referred by the relocation.
2566 (mips_elf64_write_rela): Likewise.
2568 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2570 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2571 error for out-of-range `r_sym' values.
2573 2018-04-09 Alan Modra <amodra@gmail.com>
2575 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2576 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2577 (ppc64_elf_check_relocs): Set has_pltcall.
2578 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2579 (ppc64_elf_inline_plt): New function.
2580 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2581 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2582 * elf32-ppc.c (has_pltcall): Define.
2583 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2584 (ppc_elf_check_relocs): Set has_pltcall.
2585 (ppc_elf_inline_plt): New function.
2586 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2587 (ppc_elf_size_dynamic_sections): Likewise.
2588 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2590 2018-04-09 Alan Modra <amodra@gmail.com>
2592 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2593 (is_plt_seq_reloc): New function.
2594 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2595 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2596 (ppc_elf_relax_section): Handle PLTCALL reloc.
2597 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2599 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2600 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2601 (has_tls_get_addr_call): Correct comment.
2602 (is_branch_reloc): Add PLTCALL.
2603 (is_plt_seq_reloc): New function.
2604 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2605 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2606 entry for R_PPC64_PLTCALL.
2607 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2608 (ppc_type_of_stub): Handle PLTCALL reloc.
2609 (toc_adjusting_stub_needed): Likewise.
2610 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2611 reloc insn. Nop out inline plt call sequence when resolving
2612 locally. Handle __tls_get_addr inline plt call optimization.
2614 2018-04-09 Alan Modra <amodra@gmail.com>
2616 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2617 (struct ppc_stub_hash_entry): Add symtype field.
2619 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2620 (create_linkage_sections): Create pltlocal and relpltlocal.
2621 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2623 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2624 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2625 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2626 Keep PLT entries for inline calls against locals.
2627 (ppc_build_one_stub): Use pltlocal as appropriate.
2628 (ppc_size_one_stub): Likewise.
2629 (ppc64_elf_size_stubs): Set symtype.
2630 (build_global_entry_stubs_and_plt): Init pltlocal and write
2631 relpltlocal for globals.
2632 (write_plt_relocs_for_local_syms): Likewise for local syms.
2633 (ppc64_elf_relocate_section): Support PLT for local syms.
2634 * elf32-ppc.c (PLT_KEEP): Define.
2635 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2636 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2637 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2638 Set PLT_KEEP. Adjust update_local_sym_info call.
2639 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2640 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2641 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2642 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2643 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2644 (ppc_finish_symbols): Likewise for locals.
2646 2018-04-09 Alan Modra <amodra@gmail.com>
2648 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2649 for local symbols to..
2650 (write_plt_relocs_for_local_syms): ..here. New function.
2651 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2653 (build_global_entry_stubs_and_plt): ..here. Rename from
2654 build_global_entry_stubs.
2655 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2656 Call write_plt_relocs_for_local_syms.
2657 * elf32-ppc.c (get_sym_h): New function.
2658 (ppc_elf_relax_section): Use get_sym_h.
2659 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2660 stubs for local symbols to..
2661 (ppc_finish_symbols): ..here. New function.
2662 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2664 (write_global_sym_plt): ..here. New function.
2665 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2666 (ppc_finish_symbols): Declare.
2668 2018-04-09 Alan Modra <amodra@gmail.com>
2670 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2671 (ppc_elf_relocate_section): Likewise.
2672 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2673 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2674 resolution to plt entry relative to toc pointer.
2676 2018-04-09 Alan Modra <amodra@gmail.com>
2678 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2679 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2680 file when other TLS flags are tested in a mask.
2681 (TLS_MARK, NON_GOT): Define.
2682 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2683 (update_local_sym_info): Don't create got entry when NON_GOT.
2684 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2686 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2687 (ppc64_elf_relocate_section): Likewise.
2688 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2689 __tls_get_addr calls lacking a marker reloc.
2690 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2691 TLS_TPRELGD): Renumber. Update comment.
2692 (TLS_MARK, NON_GOT): Define.
2693 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2694 (update_local_sym_info): Don't create got entry when NON_GOT.
2695 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2697 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2698 __tls_get_addr calls lacking a marker reloc.
2700 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2702 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2703 R_X86_64_converted_reloc_bit.
2705 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2708 * configure: Regenerated.
2710 2018-04-05 Alan Modra <amodra@gmail.com>
2712 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2713 (elf_hppa_info_to_howto_rel): Likewise.
2715 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2717 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2718 unsuccessfully for unimplemented relocations.
2719 (elf_hppa_info_to_howto_rel): Likewise.
2721 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2723 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2724 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2725 howto lookup failure.
2726 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2728 (elf32_i860_info_to_howto_rela): Likewise.
2729 (elf32_i860_relocate_splitn): Likewise.
2730 (elf32_i860_relocate_pc16): Likewise.
2731 (elf32_i860_relocate_pc26): Likewise.
2732 (elf32_i860_relocate_section): Likewise.
2734 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2736 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2737 check for `visium_elf_howto_table' table access.
2739 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2741 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2742 check for `iq2000_elf_howto_table' table access.
2744 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2746 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2747 for `elf32_frv_howto_table' table access.
2749 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2751 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2752 unsuccessfully for placeholder howtos.
2753 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2754 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2756 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2758 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2759 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2761 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2763 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2764 ATTRIBUTE_UNUSED from `abfd'.
2766 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2768 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2769 `_bfd_error_handler' call formatting.
2771 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2773 * elf32-mips.c (mips_info_to_howto_rel): Call
2774 `mips_elf32_rtype_to_howto' directly rather than via
2775 `->elf_backend_mips_rtype_to_howto'.
2777 2018-03-28 Renlin Li <renlin.li@arm.com>
2780 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2781 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2782 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2783 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2784 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2785 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2786 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2787 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2788 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2789 (elfNN_aarch64_final_link_relocate): Support new relocations.
2790 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2792 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2794 2018-03-28 Renlin Li <renlin.li@arm.com>
2797 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2798 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2799 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2800 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2801 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2802 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2803 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2804 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2805 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2806 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2807 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2808 TLSLE_LDST16_TPREL_LO12,
2809 TLSLE_LDST16_TPREL_LO12_NC,
2810 TLSLE_LDST32_TPREL_LO12,
2811 TLSLE_LDST32_TPREL_LO12_NC,
2812 TLSLE_LDST64_TPREL_LO12,
2813 TLSLE_LDST64_TPREL_LO12_NC,
2814 TLSLE_LDST8_TPREL_LO12,
2815 TLSLE_LDST8_TPREL_LO12_NC.
2816 * bfd-in2.h: Regenerated.
2817 * libbfd.h: Regenerated.
2819 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2822 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2823 has_old_style_got_reloc.
2824 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2825 relocations. Fix a couple of long lines.
2826 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2827 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2830 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2833 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2834 ENDBR64 to the TLSDESC PLT entry.
2836 2018-03-21 Alan Modra <amodra@gmail.com>
2838 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2839 symbols. Use size_t counts. Delete redundant opd test.
2841 2018-03-21 Alan Modra <amodra@gmail.com>
2843 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2845 2018-03-21 Alan Modra <amodra@gmail.com>
2847 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2849 (update_local_sym_info): Likewise for local_got_tls_masks.
2850 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2852 2018-03-21 Alan Modra <amodra@gmail.com>
2854 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2855 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2856 do in size_dynamic_sections.
2858 2018-03-21 Alan Modra <amodra@gmail.com>
2860 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2861 without first checking array bounds.
2862 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2864 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2867 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2868 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2870 2018-03-19 Nick Clifton <nickc@redhat.com>
2872 * po/es.po: Updated Spanish translation.
2874 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2876 * elf32-xtensa.c (xlate_map_entry): Change types of address
2877 fields from 'unsigned' to 'bfd_vma'.
2878 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2879 the key argument to bsearch. Allow offsets past the end of a
2880 section, use the last map entry for translation of such offsets.
2882 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2884 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2885 Not support the target feature.
2886 (nds32_elf_ex9_itb_base): Likewise.
2887 (nds32_elf_ex9_import_table): Likewise.
2888 (nds32_elf_ex9_finish): Likewise.
2889 (nds32_elf_ex9_reloc_jmp): Likewise.
2890 (nds32_elf_get_insn_with_reg): Likewise.
2891 (nds32_get_local_syms): Likewise.
2892 (nds32_elf_ex9_replace_instruction): Likewise.
2893 (nds32_elf_ifc_calc): Likewise.
2894 (nds32_elf_ifc_finish): Likewise.
2895 (nds32_elf_ifc_replace): Likewise.
2896 (nds32_elf_ifc_reloc): Likewise.
2898 2018-03-14 Alan Modra <amodra@gmail.com>
2900 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2901 sfpr size added before defining alias symbols.
2902 (ppc64_elf_build_stubs): Add stub section padding before
2903 copying sfpr contents and defining save/restore alias symbols.
2905 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2908 * elflink.c (elf_gc_mark_debug_section): Also check the local
2909 debug definition section.
2911 2018-03-13 Nick Clifton <nickc@redhat.com>
2914 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2915 function. Add an end address parameter. Check access of the data
2916 pointer to make sure that they do not extend beyond the end
2917 address. Return FALSE if any check fails. Add the end address
2918 pointer to the ui structure.
2919 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2920 codes to make sure that they do not extend beyond the end address
2921 pointer. Print an error message and return immediately if any
2924 2018-03-09 Nick Clifton <nickc@redhat.com>
2926 * elf64-s390.c (elf_s390_relocate_section): Move check for
2927 relocations against non-allocated sections to before the code that
2928 handles ifunc relocations.
2929 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2930 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2931 relocs against IFUNC symbols in non-allocated sections as relocs
2932 against FUNC symbols.
2933 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2935 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2938 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2939 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2940 relocation against FUNC symbol.
2941 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2943 2018-03-07 Renlin Li <renlin.li@arm.com>
2946 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2947 symbol, and don't emit relocation in specific case.
2949 2018-03-07 Alan Modra <amodra@gmail.com>
2951 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2952 (mips_elf64_slurp_one_reloc_table): Pass on error.
2954 2018-03-03 James Cowgill <james.cowgill@mips.com>
2955 Maciej W. Rozycki <macro@mips.com>
2958 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2959 after calling `undefined_symbol' hook if this is an error
2960 condition. Assume the value of 0 for the symbol requested
2963 2018-03-02 Jim Wilson <jimw@sifive.com>
2966 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2967 and nop instead of 4.
2968 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2971 2018-03-01 Jim Wilson <jimw@sifive.com>
2974 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2975 else if instead of if.
2977 2018-03-01 Alan Modra <amodra@gmail.com>
2979 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2981 2018-02-28 Alan Modra <amodra@gmail.com>
2984 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2986 2018-02-28 Nick Clifton <nickc@redhat.com>
2990 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2991 pointer. Drop unused abfd parameter. Check the size of the block
2992 before initialising the data field. Return the end pointer if the
2994 (read_attribute_value): Adjust invocations of read_n_bytes.
2997 * dwarf1.c (parse_die): Check the length of form blocks before
2998 advancing the data pointer.
3000 2018-02-28 Alan Modra <amodra@gmail.com>
3003 * aoutx.h (translate_symbol_table): Print an error message and set
3004 bfd_error on finding an invalid name string offset.
3006 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
3008 * config.in: Regenerated.
3009 * configure: Likewise.
3010 * configure.ac: Add --enable-separate-code.
3011 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
3012 to 1 for Linux/x86 targets,
3013 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
3014 DEFAULT_LD_Z_SEPARATE_CODE is 1.
3016 2018-02-27 Nick Clifton <nickc@redhat.com>
3018 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
3020 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
3021 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
3022 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
3023 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
3024 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
3025 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
3026 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
3027 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
3028 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3031 * elf-bfd.h (struct elf_backend_data): Change the return type of
3032 the elf_info_to_howto and elf_info_to_howto_rel function pointers
3034 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
3035 value from the info_to_howto function and fail if that function
3037 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
3038 from the info_to_howto function.
3039 (elf32_h8_relax_section): Likewise.
3040 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
3041 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3042 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
3043 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3044 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3045 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
3046 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
3047 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3048 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
3049 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
3050 (riscv_elf_relocate_section): Likewise.
3051 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
3052 bfd_boolean. Issue an error message, set an error value and
3053 return FALSE if the reloc is not recognized.
3054 (elf_hppa_info_to_howto_rel): Likewise.
3055 * elf-m10200.c (mn10200_info_to_howto): Likewise.
3056 * elf-m10300.c (mn10300_info_to_howto): Likewise.
3057 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
3058 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3059 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
3060 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3061 * elf32-bfin.c (bfin_info_to_howto): Likewise.
3062 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3063 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
3064 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
3065 (cris_info_to_howto_rela): Likewise.
3066 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3067 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3068 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
3070 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
3071 (elf32_dlx_info_to_howto_rel): Likewise.
3072 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3073 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3074 * elf32-frv.c (frv_info_to_howto_rela)
3075 (frvfdpic_info_to_howto_rel): Likewise.
3076 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
3077 * elf32-gen.c (elf_generic_info_to_howto)
3078 (elf_generic_info_to_howto_rel): Likewise.
3079 * elf32-h8300.c (elf32_h8_info_to_howto)
3080 (elf32_h8_info_to_howto_rel): Likewise.
3081 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3082 * elf32-i386.c (elf_i386_reloc_type_lookup)
3083 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
3084 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
3086 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3087 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3088 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3089 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3090 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3091 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
3093 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3094 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3095 * elf32-m68k.c (rtype_to_howto): Likewise.
3096 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3097 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3098 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3099 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3100 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3102 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3103 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3104 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3105 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
3107 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
3108 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3109 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3110 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3111 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
3112 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3113 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3114 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
3115 * elf32-score.c (s3_bfd_score_info_to_howto)
3116 (_bfd_score_info_to_howto): Likewise.
3117 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
3118 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3119 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3120 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
3121 (elf32_tic6x_info_to_howto_rel): Likewise.
3122 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
3123 * elf32-v850.c (v850_elf_info_to_howto_rel)
3124 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
3125 * elf32-vax.c (rtype_to_howto): Likewise.
3126 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3127 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
3128 (elf32_wasm32_info_to_howto_rela): Likewise.
3129 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
3130 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3131 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
3132 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3133 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3134 * elf64-gen.c (elf_generic_info_to_howto)
3135 (elf_generic_info_to_howto_rel): Likewise.
3136 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
3137 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
3138 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3139 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
3140 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
3141 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
3143 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
3144 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3146 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
3147 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
3148 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
3149 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
3150 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
3151 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
3152 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
3153 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
3154 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
3155 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
3158 2018-02-26 Jim Wilson <jimw@sifive.com>
3159 Stephan Schreiber <info@fs-driver.org>
3162 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
3163 call, set changed_contents and changed_relocs. Likewise after
3164 successful ia64_elf_relax_br call.
3166 2018-02-26 Alan Modra <amodra@gmail.com>
3168 * elf.c (assign_file_positions_except_relocs): Don't segfault
3169 when actual number of phdrs is less than allocated. Delete
3170 outdated comment. Formatting.
3172 2018-02-26 Alan Modra <amodra@gmail.com>
3174 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
3175 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
3176 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
3177 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
3178 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
3179 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
3180 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
3181 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
3182 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
3183 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
3184 error/warning messages.
3186 2018-02-26 Alan Modra <amodra@gmail.com>
3188 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
3189 * syms.c: Standardize error/warning messages.
3191 2018-02-26 Alan Modra <amodra@gmail.com>
3193 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
3194 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
3195 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
3196 * peXXigen.c, * peicode.h: Standardize error/warning messages.
3198 2018-02-26 Alan Modra <amodra@gmail.com>
3200 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
3202 2018-02-26 Alan Modra <amodra@gmail.com>
3204 * elfxx-mips.c: Standardize error/warning messages.
3206 2018-02-26 Alan Modra <amodra@gmail.com>
3208 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
3209 * elflink.c: Standardize error/warning messages. Replace use of
3210 linker callback einfo with _bfd_error_handler when possible.
3212 2018-02-26 Alan Modra <amodra@gmail.com>
3214 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
3215 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
3216 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
3217 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
3218 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
3219 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
3220 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
3221 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
3222 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
3223 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
3224 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
3225 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
3226 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
3227 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
3228 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
3229 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
3230 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
3231 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
3232 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
3233 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
3234 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
3235 unrecognized/unsupported reloc message.
3237 2018-02-26 Alan Modra <amodra@gmail.com>
3239 * elf32-ppc.c: Standardize error/warning messages. Use
3240 _bfd_error_handler rather than einfo when einfo features not used.
3241 * elf64-ppc.c: Likewise.
3243 2018-02-23 Alan Modra <amodra@gmail.com>
3246 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
3247 segment if no matching LOAD segment.
3249 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3251 * elf32-nds32.h: Define mask for ict_model.
3253 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
3255 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
3257 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3260 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3262 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3263 .reginfo section has wrong size.
3265 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3267 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
3268 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
3269 `.MIPS.abiflags' sections.
3270 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
3273 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3275 * section.c (SEC_FIXED_SIZE): New macro.
3276 * bfd-in2.h: Regenerate.
3278 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3280 * section.c (SEC_HAS_GOT_REF): Remove macro.
3281 * bfd-in2.h: Regenerate.
3283 2018-02-19 Alan Modra <amodra@gmail.com>
3285 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
3287 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
3288 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
3289 (_bfd_riscv_relax_pc): Likewise and fix typos.
3290 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
3291 * libbfd.h: Regenerate.
3293 2018-02-19 Alan Modra <amodra@gmail.com>
3295 * dwarf2.c (read_section): Don't use 'll' format modifier.
3296 (find_abstract_instance): Likewise.
3297 * elfcore.h (elf_core_file_p): Likewise.
3299 2018-02-19 Alan Modra <amodra@gmail.com>
3301 * bfd-in.h: Include inttypes.h or if not available define
3302 PRId64, PRIu64 and PRIx64.
3303 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
3304 modifier to print bfd_vma.
3305 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
3306 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
3307 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
3308 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
3309 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
3310 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
3311 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
3312 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
3313 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
3314 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
3315 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
3316 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
3317 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
3318 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
3319 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3320 and cast input to uint64_t, and similarly for Ld and Lu.
3321 * bfd-in2.h: Regenerate.
3323 2018-02-19 Alan Modra <amodra@gmail.com>
3325 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3326 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3327 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3328 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3329 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3330 * reloc.c: Replace use of %R and %T in format strings passed to
3331 einfo and friends by %pR and %pT.
3333 2018-02-19 Alan Modra <amodra@gmail.com>
3335 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3337 * aout-adobe.c: Update all messages using %A and %B.
3338 * aout-cris.c: Likewise.
3339 * aoutx.h: Likewise.
3340 * archive.c: Likewise.
3341 * binary.c: Likewise.
3342 * cache.c: Likewise.
3343 * coff-alpha.c: Likewise.
3344 * coff-arm.c: Likewise.
3345 * coff-i860.c: Likewise.
3346 * coff-mcore.c: Likewise.
3347 * coff-ppc.c: Likewise.
3348 * coff-rs6000.c: Likewise.
3349 * coff-sh.c: Likewise.
3350 * coff-tic4x.c: Likewise.
3351 * coff-tic54x.c: Likewise.
3352 * coff-tic80.c: Likewise.
3353 * coff64-rs6000.c: Likewise.
3354 * coffcode.h: Likewise.
3355 * coffgen.c: Likewise.
3356 * cofflink.c: Likewise.
3357 * coffswap.h: Likewise.
3358 * compress.c: Likewise.
3359 * cpu-arm.c: Likewise.
3360 * ecoff.c: Likewise.
3361 * elf-attrs.c: Likewise.
3362 * elf-eh-frame.c: Likewise.
3363 * elf-ifunc.c: Likewise.
3364 * elf-m10300.c: Likewise.
3365 * elf-properties.c: Likewise.
3366 * elf-s390-common.c: Likewise.
3368 * elf32-arc.c: Likewise.
3369 * elf32-arm.c: Likewise.
3370 * elf32-avr.c: Likewise.
3371 * elf32-bfin.c: Likewise.
3372 * elf32-cr16.c: Likewise.
3373 * elf32-cr16c.c: Likewise.
3374 * elf32-cris.c: Likewise.
3375 * elf32-crx.c: Likewise.
3376 * elf32-d10v.c: Likewise.
3377 * elf32-d30v.c: Likewise.
3378 * elf32-epiphany.c: Likewise.
3379 * elf32-fr30.c: Likewise.
3380 * elf32-frv.c: Likewise.
3381 * elf32-gen.c: Likewise.
3382 * elf32-hppa.c: Likewise.
3383 * elf32-i370.c: Likewise.
3384 * elf32-i386.c: Likewise.
3385 * elf32-i960.c: Likewise.
3386 * elf32-ip2k.c: Likewise.
3387 * elf32-iq2000.c: Likewise.
3388 * elf32-lm32.c: Likewise.
3389 * elf32-m32c.c: Likewise.
3390 * elf32-m32r.c: Likewise.
3391 * elf32-m68hc11.c: Likewise.
3392 * elf32-m68hc12.c: Likewise.
3393 * elf32-m68hc1x.c: Likewise.
3394 * elf32-m68k.c: Likewise.
3395 * elf32-mcore.c: Likewise.
3396 * elf32-mep.c: Likewise.
3397 * elf32-metag.c: Likewise.
3398 * elf32-microblaze.c: Likewise.
3399 * elf32-moxie.c: Likewise.
3400 * elf32-msp430.c: Likewise.
3401 * elf32-mt.c: Likewise.
3402 * elf32-nds32.c: Likewise.
3403 * elf32-nios2.c: Likewise.
3404 * elf32-or1k.c: Likewise.
3405 * elf32-pj.c: Likewise.
3406 * elf32-ppc.c: Likewise.
3407 * elf32-rl78.c: Likewise.
3408 * elf32-rx.c: Likewise.
3409 * elf32-s390.c: Likewise.
3410 * elf32-score.c: Likewise.
3411 * elf32-score7.c: Likewise.
3412 * elf32-sh-symbian.c: Likewise.
3413 * elf32-sh.c: Likewise.
3414 * elf32-sh64.c: Likewise.
3415 * elf32-sparc.c: Likewise.
3416 * elf32-spu.c: Likewise.
3417 * elf32-tic6x.c: Likewise.
3418 * elf32-tilepro.c: Likewise.
3419 * elf32-v850.c: Likewise.
3420 * elf32-vax.c: Likewise.
3421 * elf32-visium.c: Likewise.
3422 * elf32-wasm32.c: Likewise.
3423 * elf32-xgate.c: Likewise.
3424 * elf32-xtensa.c: Likewise.
3425 * elf64-alpha.c: Likewise.
3426 * elf64-gen.c: Likewise.
3427 * elf64-hppa.c: Likewise.
3428 * elf64-ia64-vms.c: Likewise.
3429 * elf64-mmix.c: Likewise.
3430 * elf64-ppc.c: Likewise.
3431 * elf64-s390.c: Likewise.
3432 * elf64-sh64.c: Likewise.
3433 * elf64-sparc.c: Likewise.
3434 * elf64-x86-64.c: Likewise.
3435 * elfcode.h: Likewise.
3436 * elfcore.h: Likewise.
3437 * elflink.c: Likewise.
3438 * elfnn-aarch64.c: Likewise.
3439 * elfnn-ia64.c: Likewise.
3440 * elfnn-riscv.c: Likewise.
3441 * elfxx-mips.c: Likewise.
3442 * elfxx-sparc.c: Likewise.
3443 * elfxx-tilegx.c: Likewise.
3444 * elfxx-x86.c: Likewise.
3445 * hpux-core.c: Likewise.
3448 * libbfd.c: Likewise.
3449 * linker.c: Likewise.
3450 * mach-o.c: Likewise.
3451 * merge.c: Likewise.
3453 * oasys.c: Likewise.
3454 * pdp11.c: Likewise.
3455 * pe-mips.c: Likewise.
3456 * peXXigen.c: Likewise.
3457 * peicode.h: Likewise.
3458 * reloc.c: Likewise.
3459 * rs6000-core.c: Likewise.
3461 * stabs.c: Likewise.
3462 * vms-alpha.c: Likewise.
3463 * xcofflink.c: Likewise.
3465 2018-02-19 Alan Modra <amodra@gmail.com>
3468 * elf.c (IS_TBSS): Define.
3469 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3470 (assign_file_positions_for_non_load_sections): Revert last change.
3471 Properly calculate load segment limits to compare against relro limits.
3473 2018-02-17 Alan Modra <amodra@gmail.com>
3476 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3477 degenerate zero size PT_LOAD segments when finding one overlapping
3478 the PT_GNU_RELRO segment.
3480 2018-02-16 Alan Modra <amodra@gmail.com>
3482 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3483 (_bfd_bool_bfd_true): Rename from bfd_true.
3484 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3485 (_bfd_int_bfd_0): Rename from bfd_0.
3486 (_bfd_uint_bfd_0): Rename from bfd_0u.
3487 (_bfd_long_bfd_0): Rename from bfd_0l.
3488 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3489 (_bfd_void_bfd): Rename from bfd_void.
3490 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3491 (_bfd_bool_bfd_link_false_error),
3492 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3493 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3494 (_bfd_bool_bfd_asection_bfd_asection_true),
3495 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3496 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3497 * archive.c (_bfd_noarchive_get_elt_at_index),
3498 (_bfd_noarchive_openr_next_archived_file),
3499 (_bfd_noarchive_construct_extended_name_table),
3500 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3501 (_bfd_noarchive_write_armap): New functions.
3502 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3503 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3504 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3505 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3506 (alpha_ecoff_swap_coff_lineno_out),
3507 (alpha_ecoff_swap_coff_reloc_out): New functions.
3508 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3509 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3510 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3511 (mips_ecoff_swap_coff_lineno_out),
3512 (mips_ecoff_swap_coff_reloc_out): New functions.
3513 * coffcode.h (coff_set_alignment_hook): Replace define with
3515 (symname_in_debug_hook): Likewise.
3516 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3517 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3518 * elf.c (assign_file_positions_except_relocs): Test
3519 elf_backend_allow_non_load_phdr for NULL.
3520 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3521 _bfd_elf_link_omit_section_dynsym. Update uses.
3522 (_bfd_elf_omit_section_dynsym_all): New function.
3523 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3524 (_bfd_elf_omit_section_dynsym_default): Declare.
3525 (_bfd_elf_omit_section_dynsym_all): Declare.
3526 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3527 (_bfd_nolink_bfd_get_relocated_section_contents),
3528 (_bfd_nolink_bfd_lookup_section_flags),
3529 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3530 (_bfd_nolink_bfd_link_hash_table_create),
3531 (_bfd_nolink_bfd_link_just_syms),
3532 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3533 (_bfd_nolink_bfd_link_split_section),
3534 (_bfd_nolink_section_already_linked),
3535 (_bfd_nolink_bfd_define_common_symbol),
3536 (_bfd_nolink_bfd_define_start_stop): New functions.
3537 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3538 (_bfd_norelocs_bfd_reloc_name_lookup),
3539 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3540 * section.c (_bfd_nowrite_set_section_contents): New function.
3541 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3542 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3543 (_bfd_nosymbols_get_symbol_version_string),
3544 (_bfd_nosymbols_bfd_is_local_label_name),
3545 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3546 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3547 (_bfd_nosymbols_bfd_make_debug_symbol),
3548 ( _bfd_nosymbols_read_minisymbols),
3549 ( _bfd_nosymbols_minisymbol_to_symbol),
3550 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3551 * libbfd-in.h: Declare new functions. Update existing defines,
3553 * aix386-core.c: Update to use new hooks. Formatting.
3554 * aout-adobe.c: Likewise.
3555 * aout-arm.c: Likewise.
3556 * aout-target.h: Likewise.
3557 * aout-tic30.c: Likewise.
3558 * aoutf1.h: Likewise.
3559 * binary.c: Likewise.
3561 * cisco-core.c: Likewise.
3562 * coff-alpha.c: Likewise.
3563 * coff-i386.c: Likewise.
3564 * coff-i860.c: Likewise.
3565 * coff-i960.c: Likewise.
3566 * coff-ia64.c: Likewise.
3567 * coff-mips.c: Likewise.
3568 * coff-ppc.c: Likewise.
3569 * coff-rs6000.c: Likewise.
3570 * coff-sh.c: Likewise.
3571 * coff-tic30.c: Likewise.
3572 * coff-tic54x.c: Likewise.
3573 * coff-x86_64.c: Likewise.
3574 * coff64-rs6000.c: Likewise.
3575 * coffcode.h: Likewise.
3576 * elf-m10300.c: Likewise.
3577 * elf32-cr16.c: Likewise.
3578 * elf32-lm32.c: Likewise.
3579 * elf32-m32r.c: Likewise.
3580 * elf32-metag.c: Likewise.
3581 * elf32-score.c: Likewise.
3582 * elf32-score7.c: Likewise.
3583 * elf32-tilepro.c: Likewise.
3584 * elf32-xstormy16.c: Likewise.
3585 * elf32-xtensa.c: Likewise.
3586 * elf64-alpha.c: Likewise.
3587 * elf64-hppa.c: Likewise.
3588 * elf64-ia64-vms.c: Likewise.
3589 * elf64-mmix.c: Likewise.
3590 * elf64-sh64.c: Likewise.
3591 * elfnn-ia64.c: Likewise.
3592 * elfxx-sparc.c: Likewise.
3593 * elfxx-target.h: Likewise.
3594 * elfxx-tilegx.c: Likewise.
3595 * elfxx-x86.h: Likewise.
3596 * hp300hpux.c: Likewise.
3597 * hppabsd-core.c: Likewise.
3598 * hpux-core.c: Likewise.
3599 * i386msdos.c: Likewise.
3600 * i386os9k.c: Likewise.
3603 * irix-core.c: Likewise.
3604 * libaout.h: Likewise.
3605 * libecoff.h: Likewise.
3606 * mach-o-target.c: Likewise.
3607 * mach-o.c: Likewise.
3608 * mipsbsd.c: Likewise.
3610 * netbsd-core.c: Likewise.
3611 * nlm-target.h: Likewise.
3612 * oasys.c: Likewise.
3613 * osf-core.c: Likewise.
3614 * pdp11.c: Likewise.
3615 * pe-mips.c: Likewise.
3616 * pe-x86_64.c: Likewise.
3618 * plugin.c: Likewise.
3619 * ppcboot.c: Likewise.
3620 * ptrace-core.c: Likewise.
3621 * sco5-core.c: Likewise.
3623 * sparclynx.c: Likewise.
3625 * tekhex.c: Likewise.
3626 * trad-core.c: Likewise.
3627 * verilog.c: Likewise.
3628 * versados.c: Likewise.
3629 * vms-alpha.c: Likewise.
3630 * vms-lib.c: Likewise.
3631 * wasm-module.c: Likewise.
3633 * libbfd.h: Regenerate.
3635 2018-02-15 Jim Wilson <jimw@sifive.com>
3637 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3638 symbols whose section address is zero.
3640 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3641 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3642 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3643 Add %X%P to error messages.
3645 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3648 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3649 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3650 and assert that the result of the call is not NULL.
3652 2018-02-14 Nick Clifton <nickc@redhat.com>
3655 Revert previous delta. Add extra casts to avoid compile time
3657 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3658 cast to avoid warning from gcc v8 compiler.
3659 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3660 (_bfd_generic_bfd_set_private_flags): Likewise.
3661 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3662 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3663 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3664 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3665 (_bfd_noarchive_construct_extended_name_table): Likewise.
3666 (_bfd_noarchive_truncate_arname): Likewise.
3667 (_bfd_noarchive_write_ar_hdr): Likewise.
3668 (_bfd_noarchive_get_elt_at_index): Likewise.
3669 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3670 (_bfd_nosymbols_print_symbol): Likewise.
3671 (_bfd_nosymbols_get_symbol_info): Likewise.
3672 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3673 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3674 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3675 (_bfd_nosymbols_get_lineno): Likewise.
3676 (_bfd_nosymbols_find_nearest_line): Likewise.
3677 (_bfd_nosymbols_find_line): Likewise.
3678 (_bfd_nosymbols_find_inliner_info): Likewise.
3679 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3680 (_bfd_nosymbols_read_minisymbols): Likewise.
3681 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3682 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3683 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3684 (_bfd_nowrite_set_arch_mach): Likewise.
3685 (_bfd_nowrite_set_section_contents): Likewise.
3686 (_bfd_nolink_sizeof_headers): Likewise.
3687 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3688 (_bfd_nolink_bfd_relax_section): Likewise.
3689 (_bfd_nolink_bfd_gc_sections): Likewise.
3690 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3691 (_bfd_nolink_bfd_merge_sections): Likewise.
3692 (_bfd_nolink_bfd_is_group_section): Likewise.
3693 (_bfd_nolink_bfd_discard_group): Likewise.
3694 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3695 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3696 (_bfd_nolink_bfd_link_just_syms): Likewise.
3697 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3698 (_bfd_nolink_bfd_final_link): Likewise.
3699 (_bfd_nolink_bfd_link_split_section): Likewise.
3700 (_bfd_nolink_section_already_linked): Likewise.
3701 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3702 (_bfd_nolink_bfd_define_start_stop): Likewise.
3703 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3704 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3705 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3706 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3707 * libbfd.c (bfd_false_any): Delete.
3708 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3709 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3710 * libbfd.h (extern): Regenerate
3711 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3712 cast to avoid warning from gcc v8 compiler.
3713 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3714 * binary.c (binary_get_symbol_info): Likewise.
3715 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3716 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3717 * coffcode.h (coff_set_alignment_hook): Likewise.
3718 (symname_in_debug_hook): Likewise.
3719 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3720 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3721 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3722 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3723 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3724 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3725 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3726 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3727 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3728 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3729 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3730 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3731 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3732 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3733 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3734 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3735 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3736 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3737 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3738 (bfd_elfNN_bfd_set_private_flags): Likewise.
3739 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3740 (elf_backend_init_index_section): Likewise.
3741 (elf_backend_allow_non_load_phdr): Likewise.
3742 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3743 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3744 * ieee.c (ieee_construct_extended_name_table): Likewise.
3745 (ieee_write_armap): Likewise.
3746 (ieee_write_ar_hdr): Likewise.
3747 (ieee_bfd_is_target_special_symbol): Likewise.
3748 * ihex.c (ihex_canonicalize_symtab): Likewise.
3749 (ihex_bfd_is_target_special_symbol): Likewise.
3750 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3751 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3752 (_bfd_ecoff_set_alignment_hook): Likewise.
3753 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3754 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3755 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3756 * oasys.c (oasys_construct_extended_name_table): Likewise.
3757 (oasys_write_armap): Likewise.
3758 (oasys_write_ar_hdr): Likewise.
3759 (oasys_bfd_is_target_special_symbol): Likewise.
3760 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3761 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3762 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3763 * som.c (som_bfd_is_target_special_symbol): Likewise.
3764 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3765 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3766 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3767 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3768 (versados_bfd_reloc_name_lookup): Likewise.
3769 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3770 (vms_bfd_define_start_stop): Likewise.
3771 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3772 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3773 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3775 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3778 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3779 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3780 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3781 R_X86_64_PC32 reloc against dynamic function in data section.
3782 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3783 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3784 against dynamic function in data section.
3785 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3786 function address only if pcrel_plt is true.
3787 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3788 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3789 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3790 PC-relative relocation against a function definition in data
3791 secton in PIE. Remove the obsolete comments.
3792 (elf_x86_link_hash_table): Add pcrel_plt.
3794 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3796 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3797 instead of bfd_link_pic, for building shared library.
3799 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3802 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3803 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3804 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3805 against protected function in shared object.
3807 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3810 * po/ru.po: Fix typo in Russian translation.
3812 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3814 * wasm-module.c (wasm_scan_name_function_section): Rename
3815 `index' local variable to `idx'.
3817 2018-02-13 Nick Clifton <nickc@redhat.com>
3820 Fix compile time warnings generated by gcc version 8.
3821 * libbfd-in.h: Remove extraneous text from prototypes.
3822 Add prototypes for bfd_false_any, bfd_true_any,
3823 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3824 bfd_n1_any, bfd_void_any.
3825 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3827 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3828 (_bfd_generic_bfd_set_private_flags): Likewise.
3829 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3830 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3831 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3832 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3833 (_bfd_noarchive_construct_extended_name_table): Likewise.
3834 (_bfd_noarchive_truncate_arname): Likewise.
3835 (_bfd_noarchive_write_ar_hdr): Likewise.
3836 (_bfd_noarchive_get_elt_at_index): Likewise.
3837 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3838 (_bfd_nosymbols_print_symbol): Likewise.
3839 (_bfd_nosymbols_get_symbol_info): Likewise.
3840 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3841 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3842 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3843 (_bfd_nosymbols_get_lineno): Likewise.
3844 (_bfd_nosymbols_find_nearest_line): Likewise.
3845 (_bfd_nosymbols_find_line): Likewise.
3846 (_bfd_nosymbols_find_inliner_info): Likewise.
3847 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3848 (_bfd_nosymbols_read_minisymbols): Likewise.
3849 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3850 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3851 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3852 (_bfd_nowrite_set_arch_mach): Likewise.
3853 (_bfd_nowrite_set_section_contents): Likewise.
3854 (_bfd_nolink_sizeof_headers): Likewise.
3855 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3856 (_bfd_nolink_bfd_relax_section): Likewise.
3857 (_bfd_nolink_bfd_gc_sections): Likewise.
3858 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3859 (_bfd_nolink_bfd_merge_sections): Likewise.
3860 (_bfd_nolink_bfd_is_group_section): Likewise.
3861 (_bfd_nolink_bfd_discard_group): Likewise.
3862 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3863 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3864 (_bfd_nolink_bfd_link_just_syms): Likewise.
3865 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3866 (_bfd_nolink_bfd_final_link): Likewise.
3867 (_bfd_nolink_bfd_link_split_section): Likewise.
3868 (_bfd_nolink_section_already_linked): Likewise.
3869 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3870 (_bfd_nolink_bfd_define_start_stop): Likewise.
3871 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3872 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3873 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3874 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3875 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3876 accepts one or more arguments.
3877 (bfd_true_any): Likewise.
3878 (bfd_nullvoidptr_any): Likewise.
3879 (bfd_0_any): Likewise.
3880 (bfd_0u_any): Likewise.
3881 (bfd_0l_any): Likewise.
3882 (_bfd_n1_any): Likewise.
3883 (bfd_void_any): Likewise.
3884 * libbfd.h (extern): Regenerate
3885 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3886 based dummy function.
3887 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3888 * binary.c (binary_get_symbol_info): Likewise.
3889 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3890 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3891 * coffcode.h (coff_set_alignment_hook): Likewise.
3892 (symname_in_debug_hook): Likewise.
3893 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3894 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3895 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3896 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3897 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3898 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3899 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3900 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3901 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3902 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3903 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3904 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3905 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3906 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3907 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3908 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3909 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3910 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3911 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3912 (bfd_elfNN_bfd_set_private_flags): Likewise.
3913 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3914 (elf_backend_init_index_section): Likewise.
3915 (elf_backend_allow_non_load_phdr): Likewise.
3916 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3917 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3918 * ieee.c (ieee_construct_extended_name_table): Likewise.
3919 (ieee_write_armap): Likewise.
3920 (ieee_write_ar_hdr): Likewise.
3921 (ieee_bfd_is_target_special_symbol): Likewise.
3922 * ihex.c (ihex_canonicalize_symtab): Likewise.
3923 (ihex_bfd_is_target_special_symbol): Likewise.
3924 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3925 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3926 (_bfd_ecoff_set_alignment_hook): Likewise.
3927 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3928 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3929 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3930 * oasys.c (oasys_construct_extended_name_table): Likewise.
3931 (oasys_write_armap): Likewise.
3932 (oasys_write_ar_hdr): Likewise.
3933 (oasys_bfd_is_target_special_symbol): Likewise.
3934 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3935 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3936 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3937 * som.c (som_bfd_is_target_special_symbol): Likewise.
3938 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3939 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3940 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3941 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3942 (versados_bfd_reloc_name_lookup): Likewise.
3943 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3944 (vms_bfd_define_start_stop): Likewise.
3945 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3946 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3947 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3948 * elf32-arc.c (get_replace_function): Assign replacement function
3950 * elf32-i370.c (i370_noop): Update prototype.
3952 2018-02-13 Alan Modra <amodra@gmail.com>
3955 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3956 relocation sections. If size reduces to just the flag word,
3957 remove that too and mark with SEC_EXCLUDE.
3958 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3960 2018-02-13 Alan Modra <amodra@gmail.com>
3963 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3966 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3968 * i386msdos.c (msdos_mkobject); New function.
3969 (msdos_object_p): New function.
3970 (i386_msdos_vec): Use msdos_object_p as the check_format
3972 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3973 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3975 * peXXigen.c: Likewise.
3976 * coff-ia64.c: Likewise.
3978 2018-02-12 Nick Clifton <nickc@redhat.com>
3980 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3982 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3984 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3986 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3987 (sparc_elf_append_rela): Assert that there is enough room in section.
3988 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3989 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3990 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3991 For a symbol subject to a GOT relocation, reserve a slot in the
3992 relocation section if the symbol isn't dynamic and we are in PIC mode.
3993 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3994 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3995 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3996 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3997 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3998 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3999 undefined weak symbol with non-default visibility. Remove superfluous
4000 'else' and fix formatting.
4002 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
4004 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
4006 (i386_elf32_sol2_vec): Don't declare.
4007 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
4008 Don't set need_global_offset_table.
4009 (elf_i386_solaris_arch_bed): New.
4010 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
4012 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
4013 target_os != is_nacl instead of target_os == is_normal.
4014 (x86_64_elf64_sol2_vec): Don't declare.
4015 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
4016 is_nacl instead of target_os == is_normal. Don't set
4017 need_global_offset_table.
4018 (elf_x86_64_solaris_arch_bed): New.
4019 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
4021 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
4022 _GLOBAL_OFFSET_TABLE_ for Solaris.
4023 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
4024 need_global_offset_table.
4025 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
4026 (elf_x86_link_hash_table): Remove need_global_offset_table.
4027 (elf_x86_init_table): Likewise.
4029 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
4031 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4033 (i386_elf32_sol2_vec): Declared.
4034 (elf_i386_link_setup_gnu_properties): Set
4035 need_global_offset_table with info->output_bfd->xvec.
4036 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4038 (x86_64_elf64_sol2_vec): Declared.
4039 (elf_x86_64_link_setup_gnu_properties): Set
4040 need_global_offset_table with info->output_bfd->xvec.
4042 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
4044 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4046 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
4048 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4050 (elf_x86_64_link_setup_gnu_properties): Set
4051 need_global_offset_table for Solaris.
4052 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
4053 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
4054 (_bfd_x86_elf_link_setup_gnu_properties): Copy
4055 need_global_offset_table.
4056 * elfxx-x86.h (elf_x86_link_hash_table): Add
4057 need_global_offset_table.
4058 (elf_x86_init_table): Likewise.
4060 2018-02-08 Jim Wilson <jimw@sifive.com>
4062 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
4065 2018-02-08 Nick Clifton <nickc@redhat.com>
4068 * elf.c (elf_parse_notes): Reject notes with excessuively large
4071 2018-02-07 Alan Modra <amodra@gmail.com>
4073 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
4074 * elf32-ppc.c: Remove speculation barrier support.
4075 * elf32-ppc.h: Likewise.
4076 * elf64-ppc.c: Likewise.
4077 * elf64-ppc.h: Likewise.
4079 2018-02-06 Jim Wilson <jimw@sifive.com>
4081 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
4082 callback to report an error.
4084 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
4087 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
4088 into call to !bfd_link_executable and tidy up.
4089 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
4090 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
4091 !bfd_link_executable.
4092 <R_SPARC_TLS_IE_HI22>: Likewise.
4093 <GOT relocations>: Remove useless code, tidy and merge related blocks.
4094 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
4095 !bfd_link_executable.
4096 <R_SPARC_WPLT30>: Tidy up.
4097 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
4098 !bfd_link_executable.
4099 (allocate_dynrelocs): Likewise.
4100 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
4101 <R_SPARC_TLS_GD_HI22>: Merge into...
4102 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
4103 sparc_elf_tls_transition and remove redundant code.
4104 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
4105 !bfd_link_executable.
4106 <R_SPARC_TLS_LDO_HIX22>: Likewise.
4107 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
4108 <R_SPARC_TLS_LDM_CALL>: Likewise.
4109 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
4110 <R_SPARC_TLS_GD_ADD>: Likewise.
4111 <R_SPARC_TLS_LDM_ADD>: Likewise.
4112 <R_SPARC_TLS_LDO_ADD>: Likewise.
4113 <R_SPARC_TLS_IE_LD>: Likewise.
4115 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
4118 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
4119 functions failed to find the function name, try the generic elf
4120 find function instead.
4122 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
4124 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
4125 'memcpy' instead of 'strncpy' when writing the magic number.
4127 2018-02-06 Nick Clifton <nickc@redhat.com>
4130 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
4131 section before attempting to read it in.
4132 (bfd_get_alt_debug_link_info): Likewise.
4134 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
4136 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
4137 line information in addition to name, if they can be found.
4139 2018-02-05 Renlin Li <renlin.li@arm.com>
4142 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
4143 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
4144 check for writeable section as well.
4146 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
4149 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
4150 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
4151 undefined weak symbol to 0.
4152 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
4153 if _GLOBAL_OFFSET_TABLE_ is referenced.
4154 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
4155 got_referenced instead of ref_regular_nonweak. Remove the
4156 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
4157 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
4159 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4161 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
4162 initialize `hi_reloc'.
4164 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4166 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
4167 SHT_MIPS_REGINFO sections don't assert the correct size and
4168 report an error instead.
4170 2018-02-05 Maciej W. Rozycki <macro@mips.com>
4172 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
4173 status from `->elf_backend_section_processing'.
4175 2018-02-02 Jim Wilson <jimw@sifive.com>
4178 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
4179 If link_info->wrap_hash, check for a duplicate symbol and ignore.
4180 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
4181 Pass new argument to riscv_relax_delete_bytes.
4182 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
4183 ATTRIBUTE_UNUSED from link_info parameter.
4185 2018-02-02 Alan Modra <amodra@gmail.com>
4187 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
4188 emitted for toc sequence optimization. Set and use "howto" later.
4190 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
4192 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
4193 arithmetic on NULL pointer.
4194 * elflink.c (_bfd_elf_archive_symbol_lookup,
4195 elf_link_add_archive_symbols): Likewise.
4197 2018-01-31 Michael Matz <matz@suse.de>
4199 * elflink.c (bfd_elf_define_start_stop): Fix check of
4202 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
4205 * elflink.c (bfd_elf_define_start_stop): Check if __start and
4206 __stop symbols are referenced by shared objects.
4208 2018-01-30 Alan Modra <amodra@gmail.com>
4211 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
4212 segment when demand paged with lma on the same page. Test this
4213 before load/non-load, executable/non-executable,
4214 writable/non-writable tests and simplify. Delete bogus relro
4215 condition in writable/non-writable test. Delete outdated
4216 comment. Formatting.
4218 2018-01-30 Alan Modra <amodra@gmail.com>
4220 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
4223 2018-01-29 Alan Modra <amodra@gmail.com>
4226 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
4227 range before converting to a symbol table pointer.
4229 2018-01-27 Nick Clifton <nickc@redhat.com>
4231 * po/ru.po: Updated Russian translation.
4233 2018-01-26 Alan Modra <amodra@gmail.com>
4235 * elflink.c (bfd_elf_define_start_stop): Override symbols when
4236 they are defined dynamically.
4238 2018-01-26 Alan Modra <amodra@gmail.com>
4240 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
4241 .branch_lt changes size.
4243 2018-01-25 Alan Modra <amodra@gmail.com>
4246 * elfcode.h (elf_object_p): Avoid integer overflow.
4248 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
4251 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
4252 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
4255 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
4258 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
4259 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
4260 bfd_link_executable for TLS check.
4261 (_bfd_sparc_elf_check_relocs): Likewise.
4262 (allocate_dynrelocs): Likewise.
4263 (_bfd_sparc_elf_relocate_section): Likewise.
4265 2018-01-24 Renlin Li <renlin.li@arm.com>
4267 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
4268 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4269 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4270 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4271 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4272 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4273 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4275 2018-01-24 Renlin Li <renlin.li@arm.com>
4277 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
4278 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
4279 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
4280 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
4281 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
4282 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4283 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4284 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4285 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4286 * bfd-in2.h: Regenerate.
4287 * libbfd.h: Regenerate.
4289 2018-01-23 Maciej W. Rozycki <macro@mips.com>
4291 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
4292 `mips_elf32_section_processing' comment reference.
4294 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
4297 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
4298 versioned __tls_get_addr symbol.
4300 2018-01-19 Nick Clifton <nickc@redhat.com>
4302 * po/fr.po: Updated French translation.
4304 2018-01-18 Alan Modra <amodra@gmail.com>
4306 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
4307 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
4308 (ppc64_elf_build_stubs): Likewise.
4310 2018-01-17 Nick Clifton <nickc@redhat.com>
4312 * po/ru.po: Updated Russian translation.
4313 * po/uk/po: Updated Ukranian translation.
4315 2018-01-17 Alan Modra <amodra@gmail.com>
4317 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
4319 2018-01-17 Alan Modra <amodra@gmail.com>
4321 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4322 (CRSETEQ, BEQCTRM): Define.
4323 (is_nonpic_glink_stub): Don't check bctr.
4324 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4325 (ppc_elf_relax_section): Size speculation barrier.
4326 (output_bctr): New function.
4327 (write_glink_stub): Use output_bctr.
4328 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4329 (ppc_elf_finish_dynamic_symbol): Likewise.
4330 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4331 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4332 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4333 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4334 (size_global_entry_stubs): Handle speculation barrier sizing.
4335 (plt_stub_size): Likewise.
4336 (output_bctr): New function.
4337 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4339 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4340 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4341 (build_global_entry_stubs): Output speculation barrier.
4342 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4343 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4345 2018-01-17 Alan Modra <amodra@gmail.com>
4347 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4348 __tls_get_addr_opt, and alignment sizing.
4349 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4350 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4351 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4353 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4354 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4355 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4357 (write_glink_stub): Handle __tls_get_addr_opt stub.
4358 Pad out to size given by GLINK_ENTRY_SIZE.
4359 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4360 (ppc_elf_finish_dynamic_symbol): Likewise.
4361 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4362 insn array since so many need rewriting.
4363 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4364 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4365 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4366 nops. Adjust all uses.
4367 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4368 in glink_vma calculation.
4369 (struct ppc_link_hash_table): Add global_entry section pointer.
4370 (create_linkage_sections): Create separate section for global
4372 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4373 (size_global_entry_stubs): Handle sizing for aligned stubs.
4374 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4375 and don't stash end of glink branch table in rawsize.
4376 (ppc_build_one_stub): Rewrite stub size calculations.
4377 (build_global_entry_stubs): Use new section.
4378 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4379 Build lazy link stubs out to end of section. Build global entry
4380 stubs in new section.
4382 2018-01-15 Nick Clifton <nickc@redhat.com>
4384 * po/uk.po: Updated Ukranian translation.
4386 2018-01-13 Nick Clifton <nickc@redhat.com>
4388 * po/bfd.pot: Regenerated.
4390 2018-01-13 Nick Clifton <nickc@redhat.com>
4392 * version.m4: Bump version to 2.30.51
4393 * configure: Regenerate.
4395 2018-01-13 Nick Clifton <nickc@redhat.com>
4397 2.30 branch created.
4399 2018-01-12 Jens Widell <jl@opera.com>
4401 * elf.c (setup_group): Optimize search for group by remembering
4402 last found group and restarting search at that index.
4403 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4405 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4407 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4408 bfd_link_common_skip_none in switch.
4410 2018-01-12 Alan Modra <amodra@gmail.com>
4413 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4414 references on forced local symbols.
4416 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
4418 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4419 .reginfo section has wrong size.
4421 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4424 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4425 separate code and read-only data LOAD segments, create a new
4426 LOAD segment if the previous section contains text and the
4427 current section doesn't or vice versa. Don't put a writable
4428 section in a read-only segment if there is a RELRO segment.
4430 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4433 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4434 references on forced local symbols.
4436 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4439 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4440 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4442 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4445 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4447 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4449 * elf.c (elfcore_grok_freebsd_note): Handle
4450 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4451 NT_FREEBSD_PROCSTAT_VMMAP.
4453 2018-01-03 Alan Modra <amodra@gmail.com>
4455 Update year range in copyright notice of all files.
4457 For older changes see ChangeLog-2017
4459 Copyright (C) 2018 Free Software Foundation, Inc.
4461 Copying and distribution of this file, with or without modification,
4462 are permitted in any medium without royalty provided the copyright
4463 notice and this notice are preserved.
4469 version-control: never