1 2019-12-30 Alan Modra <amodra@gmail.com>
3 * vms-alpha.c (alpha_vms_free_private): New function, extracted..
4 (vms_close_and_cleanup): ..from here.
5 (alpha_vms_object_p): Call alpha_vms_free_private on failure.
7 2019-12-30 Alan Modra <amodra@gmail.com>
9 * coffgen.c (coff_real_object_p): Free malloc'd memory on failure.
11 2019-12-30 Alan Modra <amodra@gmail.com>
13 * archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than
14 bfd_zalloc when memory is all written after the call.
15 (do_slurp_coff_armap): Likewise. Set bfd_error on ridiculously
16 large allocations that overflow bfd_size_type. Use just one
17 bfd_release on error exit.
18 (_bfd_slurp_extended_name_table): Use bfd_alloc for extended_names,
19 clear last byte rather than the entire array. Use bfd_alloc for
20 string table. Rearrange and simplify code copying file names.
22 2019-12-29 Alan Modra <amodra@gmail.com>
24 * vms-alpha.c (_bfd_vms_slurp_egsd): Make base_addr a bfd_vma.
25 Limit alignment power. Correct and simplify alignment expression.
26 (evax_bfd_print_relocation_records): Avoid signed shift left.
28 2019-12-29 Alan Modra <amodra@gmail.com>
30 * vms-misc.c (_bfd_vms_save_sized_string): Add abfd param, make
31 size a size_t. Use bfd_alloc rather than bfd_malloc.
32 (_bfd_vms_save_counted_string): Similarly.
33 * vms.h (_bfd_vms_save_sized_string): Update prototype.
34 (_bfd_vms_save_counted_string): Likewise.
35 * vms-alpha.c (_bfd_vms_slurp_ehdr): Adjust
36 _bfd_vms_save_counted_string and bfd_vms_save_sized_string calls.
37 (_bfd_vms_slurp_egsd, parse_module): Likewise.
38 (_bfd_vms_slurp_eisd): Likewise. Check return status.
39 (alpha_vms_bfd_link_hash_table_free): New function.
40 (alpha_vms_bfd_link_hash_table_create): Arrange to call it.
41 (vms_close_and_cleanup): Free more memory. Don't release tdata.
43 2019-12-29 Alan Modra <amodra@gmail.com>
45 * coffcode.h (coff_close_and_cleanup): Redefine to..
46 * coffgen.c (_bfd_coff_close_and_cleanup): ..this. New function.
47 * libcoff-in.h (_bfd_coff_close_and_cleanup): Declare.
48 * libcoff.h: Regenerate.
50 2019-12-29 Hannes Domani <ssbssa@yahoo.de>
51 Alan Modra <amodra@gmail.com>
54 * bfd.c (bfd_update_compression_header): Write zlib header for
55 formats other than ELF too.
57 2019-12-26 Alan Modra <amodra@gmail.com>
59 * som.c (setup_sections): Don't overflow space_strings_size. Use
60 bfd_malloc2 to catch overflow of size calculation.
61 (som_prep_for_fixups): Use bfd_zalloc2 to catch overflow of size
63 (som_build_and_write_symbol_table): Similarly use bfd_zmalloc2.
64 (som_slurp_symbol_table): Similarly use bfd_zmalloc2, bfd_malloc2,
66 (bfd_som_attach_aux_hdr): Use size_t vars for string length.
67 (som_bfd_count_ar_symbols): Use bfd_malloc2 to catch overflow of
68 size calculation. Use size_t vars for length and catch overflow.
69 (som_slurp_armap): Use bfd_alloc2 to catch overflow of size
71 (som_bfd_ar_write_symbol_stuff): Similarly use bfd_zmalloc2 and
72 bfd_malloc2. Perform size calculations in bfd_size_type.
74 2019-12-26 Hannes Domani <ssbssa@yahoo.de>
76 * peicode.h (pe_bfd_read_buildid): Free data.
78 2019-12-23 Alan Modra <amodra@gmail.com>
80 * vms-alpha.c (add_symbol): Add "max" parameter. Error on string
81 length larger than max.
82 (_bfd_vms_slurp_egsd): Ensure record is at least large enough to
83 read string length byte, error if not. Pass size to add_symbol.
84 (_bfd_vms_slurp_etir): Don't read past end of buffer when reading
85 type and length. Allow read of last byte in buffer.
87 2019-12-23 Alan Modra <amodra@gmail.com>
89 * wasm-module.c (wasm_read_leb128): Don't allow oversize shifts.
90 Catch value overflow. Sign extend only on terminating byte.
92 2019-12-20 Alan Modra <amodra@gmail.com>
94 * xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
96 2019-12-20 Alan Modra <amodra@gmail.com>
98 * libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
99 declaration. Move ATTRIBUTE_UNUSED to definition.
100 (sign_extend, low_sign_extend, sign_unext, low_sign_unext),
101 (re_assemble_3, re_assemble_12, re_assemble_14, re_assemble_16),
102 (re_assemble_17, re_assemble_21, re_assemble_22): Likewise. Make
103 args and return value unsigned. Use unsigned variables.
104 (hppa_rebuild_insn): Similarly.
106 2019-12-20 Alan Modra <amodra@gmail.com>
108 * format.c (bfd_check_format_matches): Free matching_vector when
109 not returning matching target strings.
111 2019-12-20 Alan Modra <amodra@gmail.com>
113 * coff-alpha.c (alpha_ecoff_read_ar_hdr): Free ar_hdr on error return.
115 2019-12-18 Alan Modra <amodra@gmail.com>
117 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Don't overflow when
118 checking symbol count against section size. Guard against strlen
119 running off end of buffer by allocating one more byte and zeroing.
120 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
122 2019-12-18 Alan Modra <amodra@gmail.com>
124 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
125 * elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.
127 2019-12-18 Alan Modra <amodra@gmail.com>
129 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): Avoid signed overflow.
130 * elf32-hppa.c (final_link_relocate): Likewise.
131 * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): Likewise.
132 (_bfd_elf_ppc_at_tprel_transform, is_insn_ds_form): Likewise.
133 (is_insn_dq_form, ppc_elf_relocate_section): Likewise.
134 * elf64-ppc.c (ok_lo_toc_insn, ppc64_elf_edit_toc): Likewise.
135 (ppc64_elf_relocate_section): Likewise.
136 * elfxx-mips.c (mips_elf_perform_relocation): Likewise.
137 * netbsd.h (N_SET_FLAGS): Likewise.
139 2019-12-17 Alan Modra <amodra@gmail.com>
141 * coff-tic80.c: Delete file.
142 * cpu-tic80.c: Delete file.
143 * archures.c: Remove tic80 support.
144 * coffcode.h: Likewise.
145 * coffswap.h: Likewise.
146 * targets.c: Likewise.
147 * config.bfd: Likewise.
148 * configure.ac: Likewise.
149 * Makefile.am: Likewise.
150 * Makefile.in: Regenerate.
151 * bfd-in2.h: Regenerate.
152 * configure: Regenerate.
153 * po/SRC-POTFILES.in: Regenerate.
155 2019-12-13 Alan Modra <amodra@gmail.com>
158 * elf.c: (assign_file_positions_for_load_sections): Attempt to
159 keep meaningless p_offset for PT_LOAD segments without file
160 contents within file size.
162 2019-12-12 Alan Modra <amodra@gmail.com>
164 * libbfd.c (bfd_get): Don't cast result of bfd_get_8.
165 * bfd-in2.h: Regenerate.
167 2019-12-11 Alan Modra <amodra@gmail.com>
169 * elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow.
170 * libaout.h (N_SET_INFO, N_SET_FLAGS): Likewise.
171 * netbsd.h (write_object_contents): Likewise.
172 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
173 * libhppa.h (HPPA_R_CONSTANT): Don't signed extend with shifts.
174 (stm32l4xx_create_replacing_stub_vldm): Don't truncate high bits
176 * elf32-nds32.h (R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG): Define
177 using 1u shifted left. Ditto for other macros.
178 * mmo.c (LOP): Make unsigned.
180 2019-12-11 Alan Modra <amodra@gmail.com>
182 * libbfd.c (bfd_get_8): Return a bfd_vma.
183 (bfd_get_signed_8): Return a bfd_signed_vma.
184 * bfd-in2.h: Regenerate.
186 2019-12-11 Alan Modra <amodra@gmail.com>
188 * xtensa-modules.c (Field_* functions): Don't mask using shifts.
189 (Operand_soffsetx4_decode, Operand_simm4_decode),
190 (Operand_simm8_decode, Operand_simm8x256_decode),
191 (Operand_simm12b_decode, Operand_label8_decode),
192 (Operand_label12_decode, Operand_soffset_decode),
193 (Operand_xt_wbr15_label_decode, Operand_xt_wbr18_label_decode): Don't
194 sign extend using shifts.
195 (Operand_immrx4_decode, Operand_uimm16x4_decode): Avoid UB in
198 2019-12-11 Alan Modra <amodra@gmail.com>
200 * cpu-ia64-opc.c (ext_imms_scaled): Avoid undefined left shift
201 of negative values by using unsigned vars.
203 2019-12-07 Alan Modra <amodra@gmail.com>
206 * elflink.c (_bfd_elf_link_assign_sym_version): Assign versions
207 for ELF_COMMON_DEF_P symbols.
208 (elf_link_output_extsym, _bfd_elf_add_default_symbol): Adjust to
211 2019-12-05 Sandra Loosemore <sandra@codesourcery.com>
213 Only give FDE encoding warnings if --eh-frame-hdr was specified.
215 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Make
216 FDE encoding warning conditional.
218 2019-12-05 Nick Clifton <nickc@redhat.com>
221 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Ignore empty sections
222 when computing the sizes stored in the headers.
224 2019-12-03 Alan Modra <amodra@gmail.com>
227 * dwarf2.c (struct dwarf2_debug_file): Add line_table and
229 (struct abbrev_offset_entry): New.
230 (hash_abbrev, eq_abbrev, del_abbrev): New functions.
231 (read_abbrevs): Check whether we have already read abbrevs at
232 given offset, and add new offset/abbrev to hash table.
233 (decode_line_info): Keep line table at offset zero in file struct.
234 Return this for a cu reusing the same dir/file list.
235 (find_abstract_instance): Find cu for DW_FORM_GNU_ref_alt.
236 (_bfd_dwarf2_slurp_debug_info): Create offset/abbrev hash tables.
237 (_bfd_dwarf2_cleanup_debug_info): Adjust deletion of lines and
240 2019-12-03 Alan Modra <amodra@gmail.com>
243 * dwarf2.c (struct dwarf2_debug_file): New struct.
244 (struct dwarf2_debug): Delete fields now in dwarf2_debug_file.
246 (struct comp_unit): Add file field.
247 (read_indirect_string, read_indirect_line_string): Adjust to suit.
248 (read_alt_indirect_string, read_alt_indirect_ref): Likewise.
249 (read_debug_ranges, find_abstract_instance, read_rangelist): Likewise.
250 (_bfd_dwarf2_stash_syms, place_sections): Likewise.
251 (stash_maybe_update_info_hash_tablse): Likewise.
252 (stash_verify_info_hash_table): Likewise.
253 (_bfd_dwarf2_slurp_debug_info): Likewise.
254 (_bfd_dwarf2_find_symbol_bias): Likewise.
255 (_bfd_dwarf2_find_nearest_line): Likewise.
256 (_bfd_dwarf2_cleanup_debug_info): Likewise.
257 (read_abbrevs): Add file param and adjust. Update calls.
258 (stash_comp_unit): Likewise.
259 (decode_line_info): Delete stash param and adjust. Update calls.
260 (comp_unit_find_nearest_line): Likewise.
261 (comp_unit_maybe_decode_line_info): Likewise.
262 (comp_unit_find_line): Likewise.
263 (parse_comp_unit): Add file and info_ptr param and adjust. Update
266 2019-12-03 Alan Modra <amodra@gmail.com>
268 * dwarf2.c (read_indirect_string): Don't duplicate offset check
269 done in read_section.
270 (read_indirect_line_string): Likewise.
271 (read_alt_indirect_string): Likewise.
272 (read_alt_indirect_ref): Likewise.
273 (read_abbrevs): Likewise. Free memory on all failure paths.
274 Use correct unsigned type for pointer difference comparison.
276 2019-12-03 Alan Modra <amodra@gmail.com>
278 * dwarf2.c (struct dwarf2_debug): Update comments. Remove sec
280 (_bfd_dwarf2_slurp_debug_info): Don't set sec or sec_info_ptr.
281 (stash_comp_unit): Likewise.
282 (read_alt_indirect_ref): Return NULL not FALSE.
284 2019-12-03 Alan Modra <amodra@gmail.com>
286 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Correct function comment.
288 2019-11-27 Alan Modra <amodra@gmail.com>
291 * dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
293 (_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
294 returning info from the symbol table. Do the _bfd_elf_find_function
295 search also when !found. Call _bfd_dwarf2_stash_syms regardless of
297 * elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
299 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
300 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
301 * libbfd.h: Regenerate.
303 2019-11-27 Alan Modra <amodra@gmail.com>
306 * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
307 (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
308 _bfd_elf_find_function. Call _bfd_elf_find_function in cases
309 where _bfd_elf_find_nearest_line would do so.
310 * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
312 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. Tidy.
313 * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
314 (elf_backend_maybe_function_sym): Define.
315 (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
316 (bfd_elf32_find_nearest_line): Don't define.
317 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
318 (elf_backend_maybe_function_sym): Define.
319 (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
320 (bfd_elfNN_find_nearest_line): Don't define.
322 2019-11-27 Alan Modra <amodra@gmail.com>
324 * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
325 (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
326 by two before applying to insn. Correct overflow test.
327 * coff-sh.c (sh_reloc): Likewise.
329 2019-11-26 Nick Clifton <nickc@redhat.com>
331 * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
332 negative relocated value.
333 * coff-sh.c (sh_reloc): Likewise.
335 2019-11-25 Alan Modra <amodra@gmail.com>
337 * archures.c (bfd_octets_per_byte): Tail call
338 bfd_arch_mach_octets_per_byte.
339 * coff-arm.c (OCTETS_PER_BYTE): Define.
340 (coff_arm_reloc): Introduce new "octets" temp. Use OCTETS_PER_BYTE
341 with section. Correct "addr". Remove ATTRIBUTE_UNUSED.
342 * coff-i386.c (coff_i386_reloc): Similarly.
343 * coff-mips.c (mips_reflo_reloc): Similarly.
344 * coff-x86_64.c (coff_amd64_reloc): Similarly.
345 * elf32-msp430.c (OCTETS_PER_BYTE): Define.
346 (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
347 * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
348 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
349 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
350 * elf32-s12z.c (opru18_reloc): Similarly.
351 * elf32-sh.c (sh_elf_reloc): Similarly.
352 * elf32-spu.c (spu_elf_rel9): Similarly.
353 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
354 * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
355 (ppc64_elf_toc64_reloc): Similarly.
356 * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
357 * cofflink.c (_bfd_coff_link_input_bfd),
358 (_bfd_coff_reloc_link_order): Likewise.
359 * elf.c (_bfd_elf_section_offset): Likewise.
360 * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
361 (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
362 (bfd_elf_final_link): Likewise.
363 * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
364 to set SEC_ELF_OCTETS.
365 * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
366 (bfd_install_relocation): Likewise.
367 (_bfd_final_link_relocate): Don't recalculate octets.
368 * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
370 * bfd-in2.h: Regenerate.
372 2019-11-25 Christian Eggers <ceggers@gmx.de>
374 * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
375 * archures.c (bfd_octets_per_byte): New parameter sec.
376 If section is not NULL and SEC_ELF_OCTETS is set, one octet es
377 returned [ELF targets only].
378 * bfd.c (bfd_get_section_limit): Provide section parameter to
380 * bfd-in2.h: regenerate.
381 * binary.c (binary_set_section_contents): Move call to
382 bfd_octets_per_byte into section loop. Provide section parameter
383 to bfd_octets_per_byte.
384 * coff-arm.c (coff_arm_reloc): Provide section parameter
385 to bfd_octets_per_byte.
386 * coff-i386.c (coff_i386_reloc): likewise.
387 * coff-mips.c (mips_reflo_reloc): likewise.
388 * coff-x86_64.c (coff_amd64_reloc): likewise.
389 * cofflink.c (_bfd_coff_link_input_bfd): likewise.
390 (_bfd_coff_reloc_link_order): likewise.
391 * elf.c (_bfd_elf_section_offset): likewise.
392 (_bfd_elf_make_section_from_shdr): likewise.
393 Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
394 .debug*, .zdebug* and .note.gnu*.
395 * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
396 to bfd_octets_per_byte.
397 * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
398 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
399 * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
400 * elf32-s12z.c (opru18_reloc): likewise.
401 * elf32-sh.c (sh_elf_reloc): likewise.
402 * elf32-spu.c (spu_elf_rel9): likewise.
403 * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
404 * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
405 (ppc64_elf_addr16_ha_reloc): likewise.
406 (ppc64_elf_toc64_reloc): likewise.
407 * elflink.c (bfd_elf_final_link): likewise.
408 (bfd_elf_perform_complex_relocation): likewise.
409 (elf_fixup_link_order): likewise.
410 (elf_link_input_bfd): likewise.
411 (elf_link_sort_relocs): likewise.
412 (elf_reloc_link_order): likewise.
413 (resolve_section): likewise.
414 * linker.c (_bfd_generic_reloc_link_order): likewise.
415 (bfd_generic_define_common_symbol): likewise.
416 (default_data_link_order): likewise.
417 (default_indirect_link_order): likewise.
418 * srec.c (srec_set_section_contents): likewise.
419 (srec_write_section): likewise.
420 * syms.c (_bfd_stab_section_find_nearest_line): likewise.
421 * reloc.c (_bfd_final_link_relocate): likewise.
422 (bfd_generic_get_relocated_section_contents): likewise.
423 (bfd_install_relocation): likewise.
424 For section which have SEC_ELF_OCTETS set, multiply output_base
425 and output_offset with bfd_octets_per_byte.
426 (bfd_perform_relocation): likewise.
428 2019-11-21 Alan Modra <amodra@gmail.com>
430 * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
431 BFDs that have not been loaded.
433 2019-11-19 Alan Modra <amodra@gmail.com>
436 * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
437 u.syment.n_value does point at another C_FILE sym and not into
438 some auxent that happens to look like a C_FILE. Properly check
439 for integer overflow and avoid possible pointer wrap-around.
440 Simplify pr17512 checks.
442 2019-11-19 Alan Modra <amodra@gmail.com>
445 * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
446 * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
448 2019-11-18 Alan Modra <amodra@gmail.com>
450 * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
451 Rename from elf_backend_post_process_headers.
452 (_bfd_elf_post_process_headers): Delete.
453 (_bfd_elf_init_file_header): Declare.
454 * elf.c (_bfd_elf_compute_section_file_positions): Call new function
455 in place of prep_headers and elf_backend_post_process_headers.
456 (_bfd_elf_init_file_header): Renamed from prep_headers with
457 updated args and made global. Delete dead code.
458 (_bfd_elf_post_process_headers): Delete.
459 * elf32-arm.c (elf32_arm_init_file_header): Rename from
460 elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
462 (elf_backend_init_file_header): Define.
463 (elf_backend_post_process_headers): Don't define.
464 * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
465 * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
466 * elf32-metag.c (elf_metag_init_file_header): Similarly.
467 * elf32-spu.c (spu_elf_init_file_header
468 * elf32-visium.c (visium_elf_init_file_header
469 * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
470 * elf64-hppa.c (elf64_hppa_init_file_header
471 * elf64-ia64-vms.c (elf64_vms_init_file_header
472 * elfnn-aarch64.c (elfNN_aarch64_init_file_header
473 * elfnn-ia64.c (elfNN_hpux_init_file_header
474 * elfxx-mips.c (_bfd_mips_init_file_header
475 * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
476 (_bfd_mips_init_file_header): Declare.
477 (elf_backend_post_process_headers): Delete.
478 (elf_backend_init_file_header): Define.
479 * elfxx-target.h (elf_backend_post_process_headers): Delete.
480 (elf_backend_init_file_header): Define and use.
481 * elf32-m68hc12.c (elf_backend_init_file_header): Define.
482 (elf_backend_post_process_headers): Don't define.
483 * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
484 (elf32_m68hc11_init_file_header): Declare.
485 * elf32-ppc.c (elf_backend_post_process_headers): Remove
488 2019-11-18 Alan Modra <amodra@gmail.com>
490 * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
491 Rename from elf_backend_modify_program_headers.
492 (_bfd_elf_modify_headers): Declare.
493 * elf.c (assign_file_positions_except_relocs): Set
494 elf_program_header_size. Always call elf_backend_modify_headers.
495 Extract code modifying file header..
496 (_bfd_elf_modify_headers): ..to here. New function.
497 * elf32-arm.c (elf_backend_modify_headers): Renamed from
498 elf_backend_modify_program_headers.
499 * elf32-i386.c: Similarly.
500 * elf64-x86-64.c: Similarly.
501 * elfxx-target.h: Similarly. Default elf_backend_modify_headers
502 to _bfd_elf_modify_headers.
503 * elf-nacl.h (nacl_modify_headers): Rename from
504 nacl_modify_program_headers.
505 * elf-nacl.c (nacl_modify_headers): Rename from
506 nacl_modify_program_headers and call _bfd_elf_modify_headers.
507 * elf32-rx.c (elf32_rx_modify_headers): Similarly.
508 * elf32-spu.c (spu_elf_modify_headers): Similarly.
509 * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
510 * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
512 2019-11-18 Alan Modra <amodra@gmail.com>
515 * bfd.c (bfd_error_type): Add bfd_error_sorry.
516 (bfd_errmsgs): Likewise.
517 * elf.c (rewrite_elf_program_header): Don't abort on confused
518 lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
519 (_bfd_elf_validate_reloc): Use bfd_error_sorry.
520 (_bfd_elf_final_write_processing): Likewise.
521 * bfd-in2.h: Regenerate.
523 2019-11-12 Jim Wilson <jimw@sifive.com>
526 * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
527 foff. If sym_sec->output_section and sec->output_section are the same
528 and not *ABS* then set max_alignment to that section's alignment.
530 2019-11-07 Alan Modra <amodra@gmail.com>
532 * cpu-cr16c.c: Delete.
533 * elf32-cr16c.c: Delete.
539 * targets.c: Remove cr16c support.
544 * po/SRC-POTFILES.in: Regenerate.
546 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
548 * doc/chew.c (add_to_definition): Use correct type when
549 calculating size of array reallocation.
550 (nextword): Always initialise the word return parameter.
551 (compile): Check return value of nextword().
553 2019-10-30 Keith Seitz <keiths@redhat.com>
555 * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
557 (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
559 (elf_read_notes): Add declaration.
560 * elf.c (elf_read_notes): Move elf-bfd.h.
561 (_bfd_elf_core_find_build_id): New function.
562 (bfd_section_from_phdr): Scan core file PT_LOAD segments for
563 build-id if none is known.
564 (elf_parse_notes): For core files, scan for notes.
565 * elfcore.h (elf_core_file_matches_executable_p): If both
566 BFDs have identical build-ids, then they match.
567 (_bfd_elf_core_find_build_id): New function.
568 * elfxx-target.h (elf_backend_core_find_build_id): Define.
569 (elfNN_bed): Add elf_backend_core_find_build_id.
571 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
573 * libcoff-in.h (struct pe_tdata): Add dos_message field.
574 * libcoff.h: Regenerate.
575 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
576 dos_message field rather than initialising it.
577 (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
579 * peicode.h (pe_mkobject): Initialise the dos_message field.
580 (pe_mkobject_hook): Copy the dos_message field.
581 (pe_bfd_object_p): Copy the dos_message field.
583 2019-10-25 Alan Modra <amodra@gmail.com>
586 * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
588 * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
590 * elf.c (elf_sort_segments): New function.
591 (assign_file_positions_except_relocs): Use shortcuts to elfheader
592 and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
593 headers. Move PT_PHDR check..
594 (assign_file_positions_for_non_load_sections): ..and code setting
595 PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
596 (assign_file_positions_for_load_sections): ..to here. Sort
597 PT_LOAD headers. Delete header_pad code. Use actual number of
598 headers rather than allocated in calculating size for program
599 headers. Don't assume program headers follow ELF file header.
600 Simplify pt_load_count code. Only set "off" for PT_LOAD or
602 (rewrite_elf_program_header): Set p_vaddr_offset for segments
603 that include file and program headers.
604 (copy_elf_program_header): Likewise, replacing header_size code.
606 2019-10-21 Alan Modra <amodra@gmail.com>
609 * archive.c (normalize): Return file unchanged when
610 BFD_ARCHIVE_FULL_PATH.
611 (_bfd_construct_extended_name_table): Pass abfd, the output
613 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
614 * bfd.c (struct bfd): Make flags a full flagword.
615 (BFD_ARCHIVE_FULL_PATH): Define.
616 * bfd-in2.h: Regenerate.
618 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
620 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
621 minimum alignment for .plt section.
623 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
625 * elf32-hppa.c: Revise import stub sequences.
626 (LONG_BRANCH_STUB_SIZE): Define.
627 (LONG_BRANCH_SHARED_STUB_SIZE): Define.
628 (IMPORT_STUB_SIZE): Define.
629 (IMPORT_SHARED_STUB_SIZE): Define.
630 (EXPORT_STUB_SIZE): Define.
631 (plt_stub): Revise to not use register %r22.
632 (LDO_R1_R22): Define.
633 (LDW_R22_R21): Define.
634 (LDW_R22_R19): Define.
635 (hppa_build_one_stub): Update stub generation and use new defines.
636 (hppa_size_one_stub): Likewise.
638 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
640 * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
641 that user should recompile their code with `fPIC` when linking non-pic
642 code into shared library.
644 * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
645 the error message if needed, and then store the result into the
646 `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
647 message for the dangerous relocation should be set before we call the
648 callback function. If we miss the error message since linker runs out
649 of memory, we should set the default error message for the error.
651 2019-10-16 Alan Modra <amodra@gmail.com>
654 * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
655 for all ppc arch info.
656 * linker.c (default_data_link_order): Pass info->big_endian to
657 arch_info->fill function.
659 2019-10-15 Alan Modra <amodra@gmail.com>
661 * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
662 (elf32_m68hc11_relocate_section): Don't use a variable for format
663 strings. Delete some unnecessary xgettext:c-format comments.
665 2019-10-15 Alan Modra <amodra@gmail.com>
668 * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
670 * elf32-m68hc1x.c (reloc_warning): New function.
671 (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
672 corresponding to %lx in format strings.
673 * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
675 2019-10-15 Alan Modra <amodra@gmail.com>
678 * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
680 2019-10-15 Alan Modra <amodra@gmail.com>
682 * bfd.c (bfd_check_compression_header): Check for powers of two
685 2019-10-14 Alan Modra <amodra@gmail.com>
687 * syms.c (struct indexentry): Add idx field.
688 (cmpindexentry): Final sort on idx.
689 (_bfd_stab_section_find_nearest_line): Set idx.
691 2019-10-14 Alan Modra <amodra@gmail.com>
693 * dwarf2.c (struct lookup_funcinfo): Add idx field.
694 (compare_lookup_funcinfos): Perform final sort on idx.
695 (build_lookup_funcinfo_table): Set idx.
696 (compare_sequences): Perform final sort on num_lines.
697 (build_line_info_table): Set num_lines and line_info_lookup earlier.
698 (sort_line_sequences): Set num_lines for sort.
700 2019-10-14 Alan Modra <amodra@gmail.com>
702 * elflink.c (elf_sort_symbol): Sort on type and name as well.
703 (elf_link_add_object_symbols): Style fix.
705 2019-10-14 Alan Modra <amodra@gmail.com>
707 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
708 for sections about to be sorted.
709 (assign_file_positions_for_load_sections): Likewise.
710 (elf_sort_sections): Don't bother optimising both TOEND case.
711 * elflink.c (bfd_elf_final_link): Reset target_index.
713 2019-10-14 Alan Modra <amodra@gmail.com>
715 * elflink.c (elf_get_linked_section_vma): Delete.
716 (compare_link_order): Use elf_linked_to_section and sort by lma,
718 (elf_fixup_link_order): Use size_t variables where appropriate.
719 Make use of elf_linked_to_section. Formatting. Properly align
722 2019-10-14 Alan Modra <amodra@gmail.com>
724 * elf-strtab.c (strrevcmp): Comment.
725 * merge.c (strrevcmp): Likewise.
726 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
727 Comment on why comparing pointers ensures a stable sort.
728 * elflink.c (struct elf_symbol): Add void* to union.
729 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
730 (elf_sym_name_compare): Likewise.
731 (bfd_elf_match_symbols_in_sections): Style fix.
732 (elf_link_sort_cmp1): Comment.
734 2019-10-14 Alan Modra <amodra@gmail.com>
737 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
738 return value of bfd_alloc2.
739 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
740 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
741 value of bfd_get_section_contents.
742 * som.c (som_write_space_strings): Don't use xmalloc.
743 (som_write_symbol_strings): Likewise.
745 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
747 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
748 stash->info_hash_status = STASH_INFO_HASH_ON when
749 stash_maybe_update_info_hash_tables succeeds.
751 2019-10-09 Alan Modra <amodra@gmail.com>
754 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
755 total_size calculation.
757 2019-10-08 Alan Modra <amodra@gmail.com>
760 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
761 recur_count. Error on recur_count reaching 100 rather than
762 info_ptr matching orig_info_ptr. Adjust calls.
764 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
766 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
767 (elf32_msp430_merge_msp430_attributes): Add support for merging
768 the GNU object attribute for data region.
770 2019-10-07 Alan Modra <amodra@gmail.com>
772 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
773 space for local got non-tls relocs when PIE.
775 2019-10-07 Alan Modra <amodra@gmail.com>
777 * elflink.c (elf_fixup_link_order): Don't attempt to find
778 an elf_section for linker created bfd sections.
780 2019-10-07 Alan Modra <amodra@gmail.com>
782 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
783 with non-local symbol. Don't double count __tls_get_addr calls
785 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
787 2019-10-07 Alan Modra <amodra@gmail.com>
789 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
791 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
793 2019-10-04 Alan Modra <amodra@gmail.com>
795 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
796 (ppc64_elf_tls_optimize): Correct is_local condition.
797 (allocate_got): Don't reserve dynamic relocations for any of the
798 tls got relocs in PIEs when the symbol is local.
799 (allocate_dynrelocs): Correct validity test for local sym using
801 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
802 for any of the tls got relocs in PIEs.
803 (ppc64_elf_layout_multitoc): Likewise.
804 (ppc64_elf_relocate_section): Correct validity test for local sym
805 using tlsld_got slot. Don't emit dynamic relocations for any of
806 the tls got relocs in PIEs when the symbol is local.
807 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
808 (got_relocs_needed): Delete.
809 (allocate_dynrelocs): Correct validity test for local sym using
810 tlsld_got slot. Don't reserve dynamic relocations for any of the
811 tls got relocs in PIEs when the symbol is local.
812 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
813 for any of the tls got relocs in PIEs.
814 (ppc_elf_relocate_section): Correct validity test for local sym
815 using tlsld_got slot. Don't emit dynamic relocations for any of
816 the tls got relocs in PIEs when the symbol is local.
818 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
822 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
823 bfd_link_pic for TLS checks.
824 (elf32_arm_final_link_relocate): Likewise.
825 (allocate_dynrelocs_for_symbol): Likewise.
827 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
830 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
832 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
834 * elf-bfd.h (bfd_section_is_ctf): New inline function.
835 * elf.c (special_sections_c): Add ".ctf".
836 (assign_file_positions_for_non_load_sections): Note that
837 compressed debugging sections etc are not assigned here. Treat
838 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
840 (assign_file_positions_except_relocs): Likewise.
841 (find_section_in_list): Note that debugging and CTF sections, as
842 well as reloc sections, are assigned later.
843 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
844 their size and contents updated.
845 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
846 compressed sections, they have no uncompressed content to copy at
848 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
849 callback right before the strtab is written out.
850 (bfd_elf_final_link): Don't cache the section contents of CTF
851 sections: they are not populated yet. Call the emit_ctf callback
852 right at the end, after all the symbols and strings are flushed
855 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
857 * elf-strtab.c (_bfd_elf_strtab_len): New.
858 (_bfd_elf_strtab_str): Likewise.
859 * bfd-elf.h: Declare them.
861 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
863 * elf-bfd.h (bfd_elf_get_str_section): Add.
864 * elf.c (bfd_elf_get_str_section): No longer static.
866 2019-09-26 Alan Modra <amodra@gmail.com>
869 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
870 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
871 ${bindir}/../lib/bfd-plugins if different.
872 * Makefile.in: Regenerate.
874 2019-09-23 Alan Modra <amodra@gmail.com>
876 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
877 in choosing between different actions for shared library and
878 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
879 (dec_dynrel_count): Likewise. Account for ifunc special case.
880 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
882 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
885 2019-09-23 Alan Modra <amodra@gmail.com>
887 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
888 * Makefile.in: Regenerate.
889 * po/SRC-POTFILES.in: Regenerate.
891 2019-09-23 Alan Modra <amodra@gmail.com>
893 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
894 (bfd_elf_version_tree): Delete forward declarations.
895 Move other forward decls and remaining elf function decl later.
896 (bfd_section_already_linked_table_init),
897 (bfd_section_already_linked_table_free),
898 (_bfd_handle_already_linked, _bfd_nearby_section),
899 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
901 2019-09-23 Alan Modra <amodra@gmail.com>
903 * bfd-in.h: Move ecoff function declarations..
904 * ecoff-bfd.h: ..to here, new file.
905 * ecoff.c: Include ecoff-bfd.h.
906 * ecofflink.c: Likewise.
907 * elf64-alpha.c: Likewise.
908 * elfxx-mips.c: Likewise.
909 * bfd-in2.h: Regenerate.
911 2019-09-23 Alan Modra <amodra@gmail.com>
913 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
914 Move most other elf declarations..
915 * elf-bfd.h: ..to here.
916 * bfd-in2.h: Regenerate.
918 2019-09-23 Alan Modra <amodra@gmail.com>
920 * bfd-in.h: Move m68k function declaration..
921 * cpu-m68k.h: ..to here, new file..
922 * elf32-m68k.h: ..and here, new file.
923 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
924 * bfd-in2.h: Regenerate.
926 2019-09-23 Alan Modra <amodra@gmail.com>
928 * bfd-in.h: Move bfin function declaration..
929 * elf32-bfin.h: ..to here, new file.
930 * elf32-bfin.c: Include elf32-bfin.h.
931 * bfd-in2.h: Regenerate.
933 2019-09-23 Alan Modra <amodra@gmail.com>
935 * bfd-in.h: Move cr16 function declaration..
936 * elf32-cr16.h: ..to here, new file.
937 * elf32-cr16.c: Include elf32-cr16.h.
938 * bfd-in2.h: Regenerate.
940 2019-09-23 Alan Modra <amodra@gmail.com>
942 * bfd-in.h (bfd_sunos_get_needed_list),
943 (bfd_sunos_record_link_assignment),
944 (bfd_sunos_size_dynamic_sections),
945 (bfd_i386linux_size_dynamic_sections),
946 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
947 * bfd-in2.h: Regenerate.
949 2019-09-23 Alan Modra <amodra@gmail.com>
951 * bfd-in.h: Move xcoff function declarations..
952 * xcofflink.h: ..to here, new file.
953 * xcofflink.c: Include xcofflink.h.
954 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
955 * bfd-in2.h: Regenerate.
957 2019-09-23 Alan Modra <amodra@gmail.com>
959 * bfd-in.h: Delete coff forward refs and move coff declaration..
960 * coff-bfd.h: ..to here.
961 * bfd-in2.h: Regenerate.
963 2019-09-23 Alan Modra <amodra@gmail.com>
965 * bfd-in.h: Move arm declaraions..
966 * cpu-arm.h: ..to here, new file..
967 * coff-arm.h: ..and here, new file..
968 * elf32-arm.h: ..and here, new file.
969 * cpu-arm.c: Include cpu-arm.h.
970 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
971 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
972 * pe-arm.c: Move function rename defines later.
973 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
974 * bfd-in2.h: Regenerate.
976 2019-09-23 Alan Modra <amodra@gmail.com>
978 * bfd-in.h: Move tic6x function declaration..
979 * elf32-tic6x.h: ..to here.
980 * bfd-in2.h: Regenerate.
982 2019-09-23 Alan Modra <amodra@gmail.com>
984 * bfd-in.h: Move aarch64 declarations and defines..
985 * cpu-aarch64.h: ..to here, new file..
986 * elfxx-aarch64.h: ..and here.
987 * cpu-aarch64.c: Include cpu-aarch64.h.
988 * elfnn-aarch64.c: Likewise.
989 * bfd-in2.h: Regenerate.
991 2019-09-23 Alan Modra <amodra@gmail.com>
993 * bfd-in.h: Delete ticoff function declarations.
994 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
995 (bfd_ticoff_get_section_load_page): Make static.
996 * bfd-in2.h: Regenerate.
998 2019-09-23 Alan Modra <amodra@gmail.com>
1000 * bfd-in.h: Move h8300 function declaration to..
1001 * cpu-h8300.h: ..here, new file.
1002 * cpu-h8300.c: Include cpu-h8300.h.
1003 * elf32-h8300.c: Likewise.
1004 * bfd-in2.h: Regenerate.
1006 2019-09-23 Alan Modra <amodra@gmail.com>
1008 * bfd-in.h: Move ia64 function declarations..
1009 * elfxx-ia64.h: ..to here.
1010 * bfd-in2.h: Regenerate.
1012 2019-09-23 Alan Modra <amodra@gmail.com>
1014 * bfd-in.h: Move v850 function declarations..
1015 * elf32-v850.h: ..to here, new file.
1016 * elf32-v850.c: Include elf32-v850.h.
1017 * bfd-in2.h: Regenerate.
1019 2019-09-23 Alan Modra <amodra@gmail.com>
1021 * bfd-in.h: Move mips function declaration to..
1022 * elfxx-mips.h: ..here.
1023 * bfd-in2.h: Regenerate.
1025 2019-09-23 Alan Modra <amodra@gmail.com>
1027 * bfd-in.h: Move csky function declarations to..
1028 * elf32-csky.h: ..here, new file.
1029 * elf32-csky.c: Include elf32-csky.h.
1030 * bfd-in2.h: Regenerate.
1032 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
1034 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
1035 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
1036 Set undefined_weak field from it.
1037 (relax_func_t): New parameter undefined_weak.
1038 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
1039 (_bfd_riscv_relax_tls_le): Likewise.
1040 (_bfd_riscv_relax_align): Likewise.
1041 (_bfd_riscv_relax_delete): Likewise.
1042 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
1043 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
1044 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
1045 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
1046 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
1048 (_bfd_riscv_relax_section): New local undefined_weak. Set for
1049 undef weak relocs that can be relaxed. Pass to relax_func call.
1051 2019-09-20 Alan Modra <amodra@gmail.com>
1053 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
1054 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
1055 (bfd_section_userdata, bfd_is_com_section, discarded_section),
1056 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
1057 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
1058 (bfd_section_list_remove, bfd_section_list_append),
1059 (bfd_section_list_prepend, bfd_section_list_insert_after),
1060 (bfd_section_list_insert_before, bfd_section_removed_from_list):
1061 New inline functions.
1062 * section.c (bfd_is_und_section, bfd_is_abs_section),
1063 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
1064 (bfd_section_list_append, bfd_section_list_prepend),
1065 (bfd_section_list_insert_after, bfd_section_list_insert_before),
1066 (bfd_section_removed_from_list): Delete macros.
1067 (bfd_section_name, bfd_section_size, bfd_section_vma),
1068 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
1069 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
1070 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
1071 (discarded_section): New inline functions.
1072 * bfd-in2.h: Regenerate.
1074 2019-09-20 Alan Modra <amodra@gmail.com>
1076 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1077 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
1078 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1079 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
1080 * targets.c (bfd_asymbol_flavour): Likewise.
1081 * bfd-in2.h: Regenerate.
1083 2019-09-20 Alan Modra <amodra@gmail.com>
1085 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
1086 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
1087 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
1088 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
1089 (bfd_get_file_flags, bfd_applicable_file_flags),
1090 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
1091 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
1092 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
1093 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
1094 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
1095 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
1096 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
1097 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
1098 (bfd_usrdata, bfd_set_usrdata): New inline functions.
1099 * targets.c (bfd_get_target, bfd_get_flavour),
1100 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
1101 (bfd_little_endian, bfd_header_big_endian),
1102 (bfd_header_little_endian, bfd_applicable_section_flags),
1103 (bfd_get_symbol_leading_char): New inline functions.
1104 * bfd-in2.h: Regenerate.
1106 2019-09-20 Alan Modra <amodra@gmail.com>
1108 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
1109 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
1112 2019-09-18 Alan Modra <amodra@gmail.com>
1114 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
1115 (bfd_get_section_lma, bfd_get_section_alignment),
1116 (bfd_get_section_size, bfd_get_section_flags),
1117 (bfd_get_section_userdata): Delete.
1118 (bfd_section_name, bfd_section_size, bfd_section_vma),
1119 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
1120 (bfd_section_flags, bfd_section_userdata): New.
1121 (bfd_is_com_section): Rename parameter.
1122 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
1123 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
1124 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
1125 (bfd_set_section_lma): New.
1126 * bfd-in2.h: Regenerate.
1127 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
1129 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
1130 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
1131 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
1132 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
1133 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
1134 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
1135 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
1136 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
1137 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
1138 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
1139 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1140 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
1141 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
1142 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
1143 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1144 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1145 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
1146 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1147 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1148 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1149 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
1150 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1151 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
1152 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
1153 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
1154 * xcofflink.c: Update throughout for bfd section macro and function
1157 2019-09-18 Alan Modra <amodra@gmail.com>
1159 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
1160 (bfd_get_output_section): Delete.
1161 (bfd_asymbol_base): Delete.
1162 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1163 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
1164 (bfd_set_asymbol_name): New macro.
1165 * bfd-in2.h: Regenerate.
1166 * aout-cris.c: Update throughout to use bfd_asymbol_section.
1167 * aoutx.h: Likewise.
1168 * cofflink.c: Likewise.
1169 * dwarf2.c: Likewise.
1170 * ecoff.c: Likewise.
1172 * elf32-arm.c: Likewise.
1173 * elf32-mips.c: Likewise.
1174 * elf32-score.c: Likewise.
1175 * elf32-score7.c: Likewise.
1176 * elfn32-mips.c: Likewise.
1177 * elfnn-aarch64.c: Likewise.
1178 * elfxx-mips.c: Likewise.
1179 * linker.c: Likewise.
1180 * pdp11.c: Likewise.
1181 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
1183 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
1185 * Makefile.in: Re-generate.
1186 * configure: Re-generate.
1187 * doc/Makefile.in: Re-generate.
1189 2019-09-18 Alan Modra <amodra@gmail.com>
1191 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
1193 * pdp11.c (slurp_symbol_table): Likewise.
1194 * som.c (som_slurp_symbol_table): Likewise.
1195 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
1196 * coffcode.h (coff_slurp_symbol_table): Likewise.
1197 * cofflink.c (_bfd_coff_final_link): Likewise.
1198 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
1199 (_bfd_ecoff_slurp_symbolic_info): Likewise.
1200 (_bfd_ecoff_slurp_symbol_table): Likewise.
1201 (_bfd_ecoff_bfd_final_link): Likewise.
1202 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
1203 * elflink.c (elf_link_output_symstrtab): Likewise.
1204 (bfd_elf_final_link): Likewise.
1205 * peicode.h (pe_ILF_build_a_bfd): Likewise.
1206 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1207 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
1208 start_address or symcount using bfd_get macros.
1209 * coffgen.c (coff_real_object_p): Likewise.
1210 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
1211 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
1212 * elfcore.h (elf_core_file_p): Don't set start_address using
1214 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
1215 using bfd_get macro.
1216 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
1217 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
1218 or symcount using bfd_get macros.
1219 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
1220 * syms.c (bfd_set_symtab): Likewise.
1221 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
1222 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
1224 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
1225 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1226 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
1227 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1228 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1229 * som.c (som_slurp_armap): Likewise.
1231 2019-09-18 Alan Modra <amodra@gmail.com>
1233 * archures.c (bfd_get_arch): Make param const.
1234 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
1235 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
1236 * bfd-in2.h: Regenerate.
1238 2019-09-18 Alan Modra <amodra@gmail.com>
1240 * bfd-in.h (carsym.name): Make const.
1241 * reloc.c (struct reloc_howto_struct.name): Likewise.
1242 * targets.c (bfd_target.name): Likewise.!
1243 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
1244 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
1245 when setting carsym.name.
1246 * bfd-in2.h: Regenerate.
1248 2019-09-18 Alan Modra <amodra@gmail.com>
1250 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
1251 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
1252 error status. Adjust calls.
1253 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
1254 Close bfd on failure. Replace xstrdup/bfd_alloc use with
1255 bfd_malloc. Use bfd_set_filename.
1257 2019-09-18 Alan Modra <amodra@gmail.com>
1259 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
1260 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
1261 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
1262 needs_copy even if all relocs are in rw sections.
1263 (dec_dynrel_count): Handle TOC16 relocs.
1264 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
1265 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
1268 2019-09-16 Phil Blundell <pb@pbcl.net>
1270 * version.m4: Set version to 2.33.50.
1271 * Makefile.in, configure, doc/Makefile.in: Regenerated.
1273 2019-09-11 Tom Tromey <tom@tromey.com>
1275 * opncls.c (bfd_set_filename): New function.
1276 * bfd-in2.h: Regenerate.
1278 2019-09-11 Alan Modra <amodra@gmail.com>
1280 * targets.c (struct bfd_target): Add _bfd_group_name.
1281 (BFD_JUMP_TABLE): Likewise.
1282 * coffgen.c (bfd_coff_group_name): New function.
1283 * elf.c (bfd_elf_group_name): New function.
1284 * linker.c (_bfd_nolink_bfd_group_name): New function.
1285 * section.c (bfd_generic_group_name): New function.
1286 * elf-bfd.h (bfd_elf_group_name): Declare.
1287 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
1288 * libcoff-in.h (bfd_coff_group_name): Declare.
1289 * aout-target.h (MY_bfd_group_name): Define.
1290 * aout-tic30.c (MY_bfd_group_name): Define.
1291 * bfd.c (bfd_group_name): Define.
1292 * binary.c (binary_bfd_group_name): Define.
1293 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
1294 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
1295 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
1296 * coffcode.h (coff_bfd_group_name): Define.
1297 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
1298 * i386msdos.c (msdos_bfd_group_name): Define.
1299 * ihex.c (ihex_bfd_group_name): Define.
1300 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
1301 * mmo.c (mmo_bfd_group_name): Define.
1302 * pef.c (bfd_pef_bfd_group_name): Define.
1303 * plugin.c (bfd_plugin_bfd_group_name): Define.
1304 * ppcboot.c (ppcboot_bfd_group_name): Define.
1305 * som.c (som_bfd_group_name): Define.
1306 * srec.c (srec_bfd_group_name): Define.
1307 * tekhex.c (tekhex_bfd_group_name): Define.
1308 * verilog.c (verilog_bfd_group_name): Define.
1309 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
1310 * xsym.c (bfd_sym_bfd_group_name): Define.
1311 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
1312 (rs6000_xcoff64_aix_vec): Likewise.
1313 * bfd-in2.h: Regenerate.
1314 * libbfd.h: Regenerate.
1315 * libcoff.h: Regenerate.
1317 2019-09-10 Nick Clifton <nickc@redhat.com>
1320 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
1322 (bfd_default_arch_struct): Initialise the new field.
1323 * bfd-in2.h: Regenerate.
1324 * cpu-aarch64.c: Initialise the new field.
1325 * cpu-alpha.c: Likewise.
1326 * cpu-arc.c: Likewise.
1327 * cpu-arm.c: Likewise.
1328 * cpu-avr.c: Likewise.
1329 * cpu-bfin.c: Likewise.
1330 * cpu-bpf.c: Likewise.
1331 * cpu-cr16.c: Likewise.
1332 * cpu-cr16c.c: Likewise.
1333 * cpu-cris.c: Likewise.
1334 * cpu-crx.c: Likewise.
1335 * cpu-csky.c: Likewise.
1336 * cpu-d10v.c: Likewise.
1337 * cpu-d30v.c: Likewise.
1338 * cpu-dlx.c: Likewise.
1339 * cpu-epiphany.c: Likewise.
1340 * cpu-fr30.c: Likewise.
1341 * cpu-frv.c: Likewise.
1342 * cpu-ft32.c: Likewise.
1343 * cpu-h8300.c: Likewise.
1344 * cpu-hppa.c: Likewise.
1345 * cpu-i386.c: Likewise.
1346 * cpu-ia64.c: Likewise.
1347 * cpu-iamcu.c: Likewise.
1348 * cpu-ip2k.c: Likewise.
1349 * cpu-iq2000.c: Likewise.
1350 * cpu-k1om.c: Likewise.
1351 * cpu-l1om.c: Likewise.
1352 * cpu-lm32.c: Likewise.
1353 * cpu-m10200.c: Likewise.
1354 * cpu-m10300.c: Likewise.
1355 * cpu-m32c.c: Likewise.
1356 * cpu-m32r.c: Likewise.
1357 * cpu-m68hc11.c: Likewise.
1358 * cpu-m68hc12.c: Likewise.
1359 * cpu-m68k.c: Likewise.
1360 * cpu-m9s12x.c: Likewise.
1361 * cpu-m9s12xg.c: Likewise.
1362 * cpu-mcore.c: Likewise.
1363 * cpu-mep.c: Likewise.
1364 * cpu-metag.c: Likewise.
1365 * cpu-microblaze.c: Likewise.
1366 * cpu-mips.c: Likewise.
1367 * cpu-mmix.c: Likewise.
1368 * cpu-moxie.c: Likewise.
1369 * cpu-msp430.c: Likewise.
1370 * cpu-mt.c: Likewise.
1371 * cpu-nds32.c: Likewise.
1372 * cpu-nfp.c: Likewise.
1373 * cpu-nios2.c: Likewise.
1374 * cpu-ns32k.c: Likewise.
1375 * cpu-or1k.c: Likewise.
1376 * cpu-pdp11.c: Likewise.
1377 * cpu-pj.c: Likewise.
1378 * cpu-plugin.c: Likewise.
1379 * cpu-powerpc.c: Likewise.
1380 * cpu-pru.c: Likewise.
1381 * cpu-riscv.c: Likewise.
1382 * cpu-rl78.c: Likewise.
1383 * cpu-rs6000.c: Likewise.
1384 * cpu-rx.c: Likewise.
1385 * cpu-s12z.c: Likewise.
1386 * cpu-s390.c: Likewise.
1387 * cpu-score.c: Likewise.
1388 * cpu-sh.c: Likewise.
1389 * cpu-sparc.c: Likewise.
1390 * cpu-spu.c: Likewise.
1391 * cpu-tic30.c: Likewise.
1392 * cpu-tic4x.c: Likewise.
1393 * cpu-tic54x.c: Likewise.
1394 * cpu-tic6x.c: Likewise.
1395 * cpu-tic80.c: Likewise.
1396 * cpu-tilegx.c: Likewise.
1397 * cpu-tilepro.c: Likewise.
1398 * cpu-v850.c: Likewise.
1399 * cpu-v850_rh850.c: Likewise.
1400 * cpu-vax.c: Likewise.
1401 * cpu-visium.c: Likewise.
1402 * cpu-wasm32.c: Likewise.
1403 * cpu-xc16x.c: Likewise.
1404 * cpu-xgate.c: Likewise.
1405 * cpu-xstormy16.c: Likewise.
1406 * cpu-xtensa.c: Likewise.
1407 * cpu-z80.c: Likewise.
1408 * cpu-z8k.c: Likewise.
1410 2019-09-09 Phil Blundell <pb@pbcl.net>
1412 binutils 2.33 branch created.
1414 2019-09-06 Alan Modra <amodra@gmail.com>
1416 * aout-target.h (object_p): Formatting.
1417 * bfd-in.h (bfd_get_filename): Don't cast to char*.
1418 * corefile.c (generic_core_file_matches_executable_p): Constify
1419 variables and remove cast.
1420 * bfd-in2.h: Regenerate.
1422 2019-09-05 Alan Modra <amodra@gmail.com>
1424 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
1425 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
1426 in the GOT/PLT entry rather than affecting the offset to that
1428 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
1430 2019-09-05 Alan Modra <amodra@gmail.com>
1432 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
1433 in second instruction.
1434 (ppc64_elf_relocate_section): Likewise.
1436 2019-09-05 Alan Modra <amodra@gmail.com>
1439 * libbfd-in.h (bfd_strdup): New inline function.
1440 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
1442 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
1443 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
1445 (bfd_openstreamr): Use bfd_strdup.
1446 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
1447 * plugin.c (try_load_plugin): Use bfd_malloc.
1448 * libbfd.h: Regenerate.
1450 2019-09-02 Alan Modra <amodra@gmail.com>
1453 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
1455 (read_alt_indirect_string): Likewise.
1456 (read_alt_indirect_ref): Likewise.
1458 2019-08-31 Jim Wilson <jimw@sifive.com>
1461 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
1462 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
1464 2019-08-30 Jim Wilson <jimw@sifive.com>
1466 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
1467 error, call bfd_set_error, set ret to FALSE, and goto out label.
1469 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
1472 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
1473 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
1475 2019-08-29 Alan Modra <amodra@gmail.com>
1478 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
1479 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
1480 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
1483 2019-08-29 Alan Modra <amodra@gmail.com>
1485 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
1486 on second insn, return it in poff.
1487 (ppc64_elf_relocate_section): Add offset to paddi addend for
1490 2019-08-28 Jim Wilson <jimw@sifive.com>
1492 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
1493 section when setting max_alignment. Update comment.
1494 (_bfd_riscv_relax_pc): Likewise.
1496 2019-08-29 Alan Modra <amodra@gmail.com>
1499 * bfd.c (struct bfd): Add no_element_cache.
1500 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
1501 archive cache when no_element_cache.
1502 (bfd_generic_archive_p): Set no_element_cache when opening first
1503 element to check format. Close first element too.
1504 (do_slurp_bsd_armap): Don't zero ardata->cache here.
1505 * bfd-in2.h: Regenerate.
1507 2019-08-24 Alan Modra <amodra@gmail.com>
1509 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
1510 symbols from GOT optimisation.
1512 2019-08-23 Stafford Horne <shorne@gmail.com>
1514 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
1517 2019-08-23 Nick Clifton <nickc@redhat.com>
1520 * elf.c (bfd_section_from_shdr): Issue an informative warning
1521 message and continue processing other sections after encountering
1522 a reloc section for a section which already has other relocs
1525 2019-08-23 Alan Modra <amodra@gmail.com>
1528 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
1529 on error without freeing plts[] contents.
1531 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
1533 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
1535 2019-08-22 Nick Clifton <nickc@redhat.com>
1538 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
1539 reading data from extra records.
1541 2019-08-22 Tamar Christina <tamar.christina@arm.com>
1544 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
1545 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
1546 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
1547 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
1550 2019-08-22 Alan Modra <amodra@gmail.com>
1552 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
1553 instead recognize CMSE_PREFIX in symbol name.
1554 (elf32_arm_gc_mark_extra_sections): Likewise.
1555 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
1556 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
1558 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
1560 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
1561 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
1563 2019-08-20 Tamar Christina <tamar.christina@arm.com>
1565 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
1566 elf32_arm_stub_long_branch_v4t_thumb_thumb,
1567 elf32_arm_stub_long_branch_v4t_thumb_arm,
1568 elf32_arm_stub_short_branch_v4t_thumb_arm,
1569 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
1570 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
1571 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
1572 previous instruction.
1574 2019-08-19 Tom Tromey <tromey@adacore.com>
1576 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
1579 2019-08-19 Alan Modra <amodra@gmail.com>
1581 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
1583 (struct _ppc64_elf_section_data): Likewise.
1584 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
1585 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
1586 than TOC loop. Check PLT16 insns too.
1588 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
1591 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
1592 PC-relative relocations back to ...
1593 (elf_x86_64_relocate_section): Here.
1595 2019-08-16 Martin Liska <mliska@suse.cz>
1598 * elflink.c: Report error only for not relocatable.
1599 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
1600 here lto_slim_object as it's handled in caller.
1602 2019-08-16 Alan Modra <amodra@gmail.com>
1604 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
1606 2019-08-15 Jim Wilson <jimw@sifive.com>
1608 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
1609 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
1610 to c.li instruction, and use ENCODE_RVC_IMM to set value.
1612 2019-08-15 Tom Tromey <tromey@adacore.com>
1614 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
1617 2019-08-14 Alan Modra <amodra@gmail.com>
1620 * dwarf2.c (stash_comp_unit): New function, extracted from..
1621 (_bfd_dwarf2_find_nearest_line): ..here.
1622 (find_abstract_instance): Parse comp units and decode line info
1625 2019-08-14 Alan Modra <amodra@gmail.com>
1627 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
1628 (comp_unit_find_nearest_line): Use it here..
1629 (_bfd_dwarf2_find_symbol_bias): ..and here.
1631 2019-08-14 Alan Modra <amodra@gmail.com>
1633 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
1634 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1635 * coffgen.c (coff_find_nearest_line_with_names): Adjust
1636 _bfd_dwarf2_find_nearest_line calls.
1637 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
1638 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1639 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1640 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
1641 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1642 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1643 * libbfd.h: Regenerate.
1645 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
1647 * elf-bfd.h (struct elf_backend_data): New members.
1648 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
1649 .gnu.hash section if necessary.
1650 (struct collect_gnu_hash_codes): New member.
1651 (elf_gnu_hash_process_symidx): New function name.
1652 (elf_renumber_gnu_hash_syms): Ignore local and undefined
1653 symbols. Record xlat location for every symbol which should have
1654 a .MIPS.xhash entry.
1655 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
1656 dynamic section if necessary.
1657 (GNU_HASH_SECTION_NAME): New define.
1658 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
1659 Update the section size info.
1660 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
1661 (struct mips_elf_link_hash_entry): New member.
1662 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
1664 (mips_elf_sort_hash_table): Initialize the pointer to the
1665 .MIPS.xhash section.
1666 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
1667 translation table entry with the symbol dynindx.
1668 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
1669 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
1671 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
1673 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
1675 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
1676 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
1678 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
1679 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
1680 (_bfd_mips_post_process_headers): Mark the ABI version as
1681 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
1682 but not a .hash section.
1683 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
1684 position in the translation table, associated with the hash
1686 * elfxx-mips.h (literal_reloc_p): Define
1687 elf_backend_record_xhash_symbol backend hook.
1688 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
1691 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1693 * elf64-bpf.c (bpf_elf_relocate_section): New function.
1694 (bpf_elf_insn_disp_reloc): Delete function.
1695 (elf_backend_relocate_section): Define.
1697 2019-08-07 Alan Modra <amodra@gmail.com>
1700 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
1701 for overflow in expressions involving nsymz.
1703 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1705 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1706 two pages in relro presence.
1708 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1710 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1711 (get_wsr_lbeg_opcode): New functions.
1712 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1713 and insn_len for the first actual instruction of the loop.
1715 2019-07-30 Alan Modra <amodra@gmail.com>
1718 * bfd.c (struct bfd): Add lto_slim_object flag.
1719 * bfd-in2.h: Regenerate.
1721 2019-07-29 Martin Liska <mliska@suse.cz>
1724 * archive.c (_bfd_compute_and_write_armap): Come up with
1725 report_plugin_err variable.
1726 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1727 * elf.c (struct lto_section): New.
1728 (_bfd_elf_make_section_from_shdr): Parse content of
1729 .gnu_lto_.lto section.
1730 * elflink.c: Report error for a missing LTO plugin.
1731 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1733 2019-07-28 Alan Modra <amodra@gmail.com>
1737 * elflink.c (elf_link_add_object_symbols): Report an informative
1738 error on finding local symbols with index equal or greater than
1739 symbol table sh_info. Correct comment. Allow such symbols in
1740 dynamic objects. Abort on NULL section for symbol.
1742 2019-07-26 Alan Modra <amodra@gmail.com>
1744 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1745 (elf_linker): Don't define.
1746 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1748 2019-07-25 YunQiang Su <syq@debian.org>
1751 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1754 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1756 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1758 (reloc_type_to_name): Fix formating.
1759 (arc_elf_object_p): Likewise.
1760 (debug_arc_reloc): Likewise.
1761 (arc_do_relocation): Likewise.
1763 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1765 * elf32-arc.c (bfd_get_32_me): New function.
1766 (bfd_put_32_me): Likewise.
1767 (arc_elf_relax_section): Likewise.
1768 (bfd_elf32_bfd_relax_section): Define.
1770 2019-07-24 Alan Modra <amodra@gmail.com>
1772 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1773 elf_backend_final_write_processing, don't pass linker arg.
1774 (_bfd_elf_final_write_processing): Update prototype.
1775 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1776 (_bfd_elf_final_write_processing): Return error on incompatible
1777 OSABI and has_gnu_osabi. Remove linker arg.
1778 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1779 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1780 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1781 (_bfd_mips_elf_final_write_processing): Likewise.
1782 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1783 and remove linker arg.
1784 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1785 * elf-nacl.c (nacl_final_write_processing): Likewise.
1786 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1787 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1788 * elf32-arm.c (arm_final_write_processing): Likewise.
1789 (elf32_arm_final_write_processing): Likewise.
1790 (elf32_arm_nacl_final_write_processing): Likewise.
1791 (elf32_arm_vxworks_final_write_processing): Likewise.
1792 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1793 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1794 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1795 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1796 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1797 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1798 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1799 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1800 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1801 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1802 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1803 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1804 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1805 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1806 (ppc_elf_final_write_processing): Likewise.
1807 (ppc_elf_vxworks_final_write_processing): Likewise.
1808 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1809 (elf32_sparc_final_write_processing): Likewise.
1810 (elf32_sparc_vxworks_final_write_processing): Likewise.
1811 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1812 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1813 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1814 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1815 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1816 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1817 (_bfd_mips_elf_final_write_processing): Likewise.
1819 2019-07-24 Alan Modra <amodra@gmail.com>
1821 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1823 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1824 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1826 2019-07-24 Alan Modra <amodra@gmail.com>
1828 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1829 EI_OSABI header byte here.
1830 (ELF_OSABI): Define.
1832 2019-07-23 Alan Modra <amodra@gmail.com>
1834 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1835 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1836 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1837 when elf_gnu_osabi_mbind is set.
1838 (_bfd_elf_map_sections_to_segments): Likewise.
1839 (_bfd_elf_init_private_section_data): Likewise.
1840 (_bfd_elf_final_write_processing): Update comment.
1841 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1842 (elf_backend_special_sections): Define without .tbss for linux.
1844 2019-07-23 Alan Modra <amodra@gmail.com>
1846 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1847 Remove none, any, all enums.
1848 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1849 (_bfd_elf_final_write_processing): Declare.
1850 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1851 elf_backend_final_write_processing.
1852 (_bfd_elf_post_process_headers): Move body of function to..
1853 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1854 only when not already set. Adjust for rename.
1855 * elfxx-target.h (elf_backend_final_write_processing): Default to
1856 _bfd_elf_final_write_processing.
1857 * elf-hppa.h (elf_hppa_final_write_processing): Call
1858 _bfd_elf_final_write_processing.
1859 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1860 * elf-nacl.c (nacl_final_write_processing): Likewise.
1861 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1862 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1863 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1864 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1865 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1866 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1867 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1868 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1869 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1870 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1871 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1872 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1873 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1874 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1875 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1876 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1877 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1878 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1879 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1880 * elf32-arm.c (arm_final_write_processing): Split out from..
1881 (elf32_arm_final_write_processing): ..here. Call
1882 _bfd_elf_final_write_processing.
1883 (elf32_arm_nacl_final_write_processing): Adjust.
1884 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1885 (_bfd_mips_elf_final_write_processing): ..here. Call
1886 _bfd_elf_final_write_processing.
1887 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1888 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1889 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1890 (ppc_elf_final_write_processing): ..here. Call
1891 _bfd_elf_final_write_processing.
1892 (ppc_elf_vxworks_final_write_processing): Adjust.
1893 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1894 (elf32_sparc_final_write_processing): ..here. Call
1895 _bfd_elf_final_write_processing.
1896 (elf32_sparc_vxworks_final_write_processing): Adjust.
1897 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1898 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1899 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1900 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1901 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1902 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1903 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1904 * elflink.c (elf_link_add_object_symbols): Likewise.
1905 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1908 2019-07-23 Omar Majid <omajid@redhat.com>
1910 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1911 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1912 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1914 * peXXigen.c: Add comment about source of .NET magic numbers.
1916 2019-07-19 Alan Modra <amodra@gmail.com>
1918 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1919 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1920 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1921 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1922 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1923 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1924 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1925 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1926 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1927 * bfd-in2.h: Regenerate.
1928 * libbfd.h: Regenerate.
1930 2019-07-18 Alan Modra <amodra@gmail.com>
1932 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1933 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1936 2019-07-18 Alan Modra <amodra@gmail.com>
1938 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1939 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1940 is more than 8 bits.
1941 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1942 tls_type vars unsigned int.
1943 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1944 to select r_type edit.
1946 2019-07-18 Alan Modra <amodra@gmail.com>
1948 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1950 * elf64-ppc.c (TLS_GDIE): Likewise.
1952 2019-07-18 Alan Modra <amodra@gmail.com>
1954 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1955 range of tp-relative offsets.
1957 2019-07-15 Alan Modra <amodra@gmail.com>
1959 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1960 alias is no longer bfd_link_hash_defined, clear the alias.
1962 2019-07-13 Alan Modra <amodra@gmail.com>
1964 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1966 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1967 (_bfd_elf_init_2_index_sections): Likewise.
1968 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1969 relocations for local TLS symbols, use STN_UNDEF as the relocation
1971 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1972 leave TLS symbol value in the addend.
1974 2019-07-08 Alan Modra <amodra@gmail.com>
1977 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1978 size before reading first word.
1980 2019-07-02 Nick Clifton <nickc@redhat.com>
1983 * elf.c (is_debuginfo_file): New function.
1984 (assign_file_positions_for_non_load_sections): Do not warn about
1985 allocated sections outside of loadable segments if they are found
1986 in a debuginfo file.
1987 * elf-bfd.h (is_debuginfo_file): Prototype.
1989 2019-07-02 Nick Clifton <nickc@redhat.com>
1992 * compress.c (bfd_get_full_section_contents): Do not complain
1993 about linker created sections that are larger than the file size.
1995 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1997 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1998 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
2000 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
2002 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
2004 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
2005 sections when .text section contain secure entry functions
2008 2019-07-01 Nick Clifton <nickc@redhat.com>
2011 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
2012 section VMA in the offset used to update exidx relocs.
2014 2019-06-28 Nick Clifton <nickc@redhat.com>
2017 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
2018 large version reference section.
2019 * compress.c (bfd_get_full_section_contents): Check for an
2020 uncompressed section whose size is larger than the file size.
2022 2019-06-28 Alan Modra <amodra@gmail.com>
2024 * format.c (bfd_check_format_matches): Don't match plugin target
2025 if another target matches. Expand comment.
2026 * targets.c (_bfd_target_vector): Move plugin_vec after all other
2027 non-corefile targets, outside !SELECT_VECS.
2028 * config.bfd: Don't handle targ=plugin here.
2029 * configure.ac: Don't add plugin to enable_targets or handle in
2030 target loop setting selvecs and other target vars.
2031 * configure: Regenerate.
2033 2019-06-26 Nick Clifton <nickc@redhat.com>
2036 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
2037 messages for failures.
2038 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
2039 if returning an error value.
2041 2019-06-25 Jan Beulich <jbeulich@suse.com>
2043 * elf-properties.c (elf_find_and_remove_property): Rename last
2044 parameter. Mention it in comment.
2046 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
2048 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
2049 SEC_MERGE or SEC_CODE flags are set.
2050 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
2051 symtype consistently. Don't include sec_addr (sym_sec) in symval.
2052 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
2053 Add sec_addr (sym_sec) after handling merge sections.
2055 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
2058 * elf-properties.c (elf_merge_gnu_property_list): Remove the
2059 property after reporting property removal.
2061 2019-06-23 Alan Modra <amodra@gmail.com>
2064 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
2065 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
2066 Reduce range of offsets allowed for other GOT relocs.
2068 2019-06-23 Alan Modra <amodra@gmail.com>
2071 * elfcode.h (elf_object_p): Warning fix.
2073 2019-06-21 Alan Modra <amodra@gmail.com>
2076 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
2078 2019-06-19 Alan Modra <amodra@gmail.com>
2081 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
2082 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
2084 2019-06-19 Alan Modra <amodra@gmail.com>
2086 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
2087 functions that require r2 valid to use local entry.
2088 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
2090 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2092 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
2093 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
2094 with elfNN_aarch64_allocate_local_dynrelocs.
2096 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
2098 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
2100 2019-06-14 Alan Modra <amodra@gmail.com>
2102 * Makefile.in: Regenerate.
2103 * configure: Regenerate.
2105 2019-06-14 Alan Modra <amodra@gmail.com>
2107 * elf64-ppc.c: Fix comments involving paddi.
2109 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
2112 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
2113 absent, or the bfd is not in the ELF formart.
2114 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
2116 2019-06-10 Christos Zoulas <christos@zoulas.com>
2119 * elf.c (elfcore_make_auxv_note_section): New function.
2120 (elfcore_grok_note): Use it.
2121 (elfcore_grok_freebsd_note): Likewise.
2122 (elfcore_grok_openbsd_note): Likewise.
2123 (elfcore_grok_netbsd_note): Likewise. Plus add support for
2124 NT_NETBSDCORE_AUXV notes.
2126 2019-06-06 Sudakshina Das <sudi.das@arm.com>
2128 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
2129 alignment of the new gnu property section.
2131 2019-06-06 Sudakshina Das <sudi.das@arm.com>
2133 * bfd-in.h: Change comment.
2134 * bfd-in2.h: Regenerate.
2135 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
2136 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
2139 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
2141 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
2142 Remove overflow check.
2144 2019-05-28 Alan Modra <amodra@gmail.com>
2147 * cofflink.c (coff_link_check_archive_element): Don't assume
2148 element is a coff object file after calling add_archive_element.
2150 2019-05-28 Alan Modra <amodra@gmail.com>
2153 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
2154 attempt to set sh_entsize for excluded PLT section.
2156 2019-05-28 Alan Modra <amodra@gmail.com>
2159 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
2160 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
2161 allocated in alpha_dynamic_entries_for_reloc.
2163 2019-05-28 Alan Modra <amodra@gmail.com>
2166 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
2167 on NULL output_section.
2168 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
2170 2019-05-28 Alan Modra <amodra@gmail.com>
2173 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
2174 entry when MUST_FIND. Abort when MUST_FIND not found.
2175 (elf_m68k_get_bfd2got_entry): Likewise.
2176 (elf_m68k_relocate_section): Remove now useless assert.
2178 2019-05-28 Alan Modra <amodra@gmail.com>
2181 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
2182 from bfd_link_info, not an output section owner.
2183 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
2184 (elf_hppa_final_link_relocate): Likewise.
2186 2019-05-28 Alan Modra <amodra@gmail.com>
2189 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
2190 create_object_symbols_section, obj_textsec, obj_datasec or
2191 obj_bsssec. Fix other errors in placement.
2192 * config.bfd: Obsolete tic30-aout.
2194 2019-05-28 Alan Modra <amodra@gmail.com>
2197 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
2198 end of section list as well as section_count.
2199 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
2200 section list before returning error.
2202 2019-05-27 Alan Modra <amodra@gmail.com>
2204 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
2206 2019-05-27 Alan Modra <amodra@gmail.com>
2209 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
2211 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
2213 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
2214 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
2215 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
2216 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
2217 (elf_backend_merge_symbol_attribute): Define.
2219 2019-05-24 Alan Modra <amodra@gmail.com>
2221 * po/SRC-POTFILES.in: Regenerate.
2223 2019-05-24 Alan Modra <amodra@gmail.com>
2225 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
2226 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
2227 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
2228 (struct ppc_link_hash_table): Add powerxx_stubs.
2229 (ppc64_elf_check_relocs): Set powerxx_stubs.
2230 (build_powerxx_offset, size_powerxx_offset),
2231 (num_relocs_for_powerxx_offset),
2232 (emit_relocs_for_powerxx_offset): New functions.
2233 (plt_stub_size): Size powerxx stubs.
2234 (ppc_build_one_stub): Emit powerxx stubs.
2235 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
2238 2019-05-24 Alan Modra <amodra@gmail.com>
2240 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
2241 R_PPC64_GOT_PCREL34.
2242 (xlate_pcrel_opt): New function.
2243 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
2244 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2245 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
2247 2019-05-24 Alan Modra <amodra@gmail.com>
2249 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
2250 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
2251 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
2252 (BFD_RELOC_PPC64_PLT_PCREL34),
2253 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
2254 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
2255 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
2256 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
2257 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
2258 * elf64-ppc.c (PNOP): Define.
2259 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
2260 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
2261 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
2263 (ppc64_elf_prefix_reloc): New function.
2264 (struct ppc_link_hash_table): Add notoc_plt.
2265 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
2266 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
2267 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
2268 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
2269 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
2270 possible need for dynamic relocs on non-pcrel powerxx relocs.
2271 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
2272 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
2273 (toc_adjusting_stub_needed): Likewise.
2274 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
2275 (ppc64_elf_relocate_section): Handle new powerxx relocs.
2276 * bfd-in2.h: Regenerate.
2277 * libbfd.h: Regenerate.
2279 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
2281 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
2282 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
2284 * configure: Regenerate.
2286 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
2288 * configure: Regenerated.
2289 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
2290 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
2291 (BFD64_BACKENDS): Add elf64-bpf.lo.
2292 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
2293 * Makefile.in (SOURCE_HFILES): Regenerate.
2294 * config.bfd (targ_cpu): Handle bpf-*-* targets.
2295 * cpu-bpf.c: New file.
2296 * elf64-bpf.c: Likewise.
2297 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
2299 * archures.c: Define architecture bfd_arch_bpf and machine
2301 * reloc.c: Define BFD relocations used by the BPF target.
2302 * bfd-in2.h: Regenerated.
2303 * libbfd.h: Likewise.
2305 2019-05-22 Alan Modra <amodra@gmail.com>
2307 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
2310 2019-05-22 Alan Modra <amodra@gmail.com>
2312 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
2313 processing on "size error in section".
2315 2019-05-22 Alan Modra <amodra@gmail.com>
2317 * som.c (som_bfd_free_cached_info): Call
2318 _bfd_generic_close_and_cleanup.
2320 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2322 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
2323 for TLS_TPREL_HI16(/LO16) relocations in shared library.
2325 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2327 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
2328 checks. Search the RELA table for n64 relocations.
2330 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
2331 Faraz Shahbazker <fshahbazker@wavecomp.com>
2333 * elfxx-mips.c (LA25_BC): New macro.
2334 (mips_elf_link_hash_table)<compact_branches>: New field.
2335 (STUB_JALRC): New macro.
2336 (mipsr6_o32_exec_plt0_entry_compact): New array.
2337 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
2338 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
2339 (mipsr6_exec_plt_entry_compact): Likewise.
2340 (mips_elf_create_la25_stub): Use BC instead of J for stubs
2341 when compact_branches is true.
2342 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
2343 PLT for MIPSR6 with compact_branches. Do not reorder the
2344 compact branches PLT. Switch the lazy stub for MIPSR6
2345 with compact_branches to use JALRC.
2346 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
2347 when compact_branches is true.
2348 (_bfd_mips_elf_compact_branches): New function.
2349 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
2351 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2354 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
2355 Fix print formatter.
2357 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2360 * elf32-arm.c (get_value_helper): Remove.
2361 (elf32_arm_final_link_relocate): Fix branch future relocations.
2363 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2366 * bfd-in.h (enum erratum_84319_opts): New
2367 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
2368 int to enum erratum_84319_opts.
2369 * bfd-in2.h: Regenerate.
2370 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
2371 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
2372 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
2373 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
2374 (_bfd_aarch64_resize_stubs): Amend comment.
2375 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
2377 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
2378 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
2380 (clear_erratum_843419_entry): Update erratum conditional.
2382 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2385 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
2386 when computing distance_short_enough.
2388 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2391 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
2392 Wrap around even if distance equals avr_pc_wrap_around.
2394 2019-05-20 Nick Clifton <nickc@redhat.com>
2396 * po/fr.po: Updated French translation.
2398 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
2400 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
2402 2019-05-16 Alan Modra <amodra@gmail.com>
2404 * elf32-arm.c (elf32_arm_write_section): Revert last change.
2406 2019-05-15 Alan Modra <amodra@gmail.com>
2408 * elf32-arm.c (elf32_arm_write_section): Don't leave
2409 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
2410 unitialised section contents.
2412 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
2415 * verilog.c: (VerilogDataWidth): New variable.
2416 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
2418 2019-05-08 Nick Clifton <nickc@redhat.com>
2421 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
2422 rather than FALSE if encountering a non-ELF file.
2424 2019-05-06 Alan Modra <amodra@gmail.com>
2426 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
2428 2019-05-06 Alan Modra <amodra@gmail.com>
2430 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
2431 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
2432 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
2433 * libbfd.h: Regenerate.
2434 * bfd-in2.h: Regenerate.
2436 2019-05-04 Alan Modra <amodra@gmail.com>
2439 * syms.c (coff_section_type): Only allow '.', '$' and numeric
2440 following the standard section names.
2441 (bfd_decode_symclass): Prioritize section flag tests in
2442 decode_section_type before name tests in coff_section_type.
2443 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
2444 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
2445 their names and choose standard .text section flags for
2448 2019-05-02 Nick Clifton <nickc@redhat.com>
2451 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
2452 .gnu.debugaltlink sections as debugging sections.
2454 2019-04-30 Alan Modra <amodra@gmail.com>
2456 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
2457 (struct _ppc64_elf_section_data): Likewise.
2458 (ppc64_elf_check_relocs): Set above fields.
2459 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
2460 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2463 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2466 * elflink.c (elf_link_output_extsym): Don't complain undefined
2467 weak dynamic reference.
2469 2019-04-25 Sudakshina Das <sudi.das@arm.com>
2471 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
2472 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
2473 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
2474 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
2475 (elfNN_aarch64_small_plt0_pac_entry): Remove.
2476 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
2477 (elfNN_aarch64_small_plt0_bti_entry): Update.
2478 (elfNN_aarch64_small_plt_bti_entry): Update.
2479 (elfNN_aarch64_small_plt_pac_entry): Update.
2480 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
2481 (setup_plt_values): Setup new entries.
2482 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
2483 (elfNN_aarch64_plt_sym_val): Likewise.
2485 2019-04-22 Jim Wilson <jimw@sifive.com>
2487 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
2489 2019-04-19 Alan Modra <amodra@gmail.com>
2491 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
2493 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2495 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
2496 building shared object.
2497 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
2499 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2502 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
2505 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2507 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
2509 * bfd-in2.h: Regenerate.
2510 * libbfd.h: Likewise.
2512 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2514 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
2515 * bfd-in2.h: Regenerated.
2516 * libbfd.h: Regenerated.
2518 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2520 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
2521 * bfd-in2.h: Regenerated.
2522 * libbfd.h: Likewise.
2524 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2526 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
2527 * bfd-in2.h: Regenerated.
2528 * libbfd.h: Regenerated.
2529 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
2530 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
2531 and R_ARM_THM_BF12 together.
2532 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
2534 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2536 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
2537 * libbfd.h: Regenerated.
2538 * bfd-in2.h: Regenerated.
2539 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
2540 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
2541 and R_ARM_THM_BF18 together.
2542 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
2544 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2546 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
2547 * bfd-in2.h: Regenerated.
2548 * libbfd.h: Regenerated.
2549 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
2550 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
2551 and R_ARM_THM_BF16 together.
2552 (get_value_helper): New reloc helper.
2553 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
2555 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2557 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
2558 * bfd-in2.h: Regenerate.
2559 * libbfd.h: Regenerate.
2561 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2563 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
2564 * bfd-in2.h: Regenerate.
2565 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
2566 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
2568 (using_thumb2): Likewise.
2569 (using_thumb2_bl): Update assert.
2570 (arch_has_arm_nop): Likewise.
2571 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
2572 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
2574 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2576 * elf-linker-x86.h (elf_x86_cet_report): New.
2577 (elf_linker_x86_params): Add cet_report.
2578 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2579 missing IBT and SHSTK properties if needed.
2581 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2584 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
2585 "h != NULL". Don't check "h != NULL" before calling.
2586 bfd_elf_gc_record_vtentry.
2587 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2588 * elf32-bfin.c (bfin_check_relocs): Likewise.
2589 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2590 * elf32-csky.c (csky_elf_check_relocs): Likewise.
2591 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
2592 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
2593 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
2594 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
2595 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
2596 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2597 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2598 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
2599 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2600 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2601 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
2602 * elf32-metag.c (elf_metag_check_relocs): Likewise.
2603 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
2604 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
2605 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2606 * elf32-sh.c (sh_elf_check_relocs): Likewise.
2607 * elf32-v850.c (v850_elf_check_relocs): Likewise.
2608 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2609 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2610 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2611 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
2612 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2613 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2614 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
2615 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2616 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2617 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
2620 2019-04-11 Alan Modra <amodra@gmail.com>
2623 * elflink.c (elf_link_add_object_symbols): Don't read partial
2624 dynamic entries from fuzzed objects.
2626 2019-04-11 Tamar Christina <tamar.christina@arm.com>
2629 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
2630 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
2631 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
2633 2019-04-10 Michael Forney <mforney@mforney.org>
2636 * doc/chew.c (free_words): Correctly free "push_text" strings.
2638 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
2640 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
2642 2019-04-08 Alan Modra <amodra@gmail.com>
2644 * configure.ac (elfxx_x86): Define and use.
2645 * configure: Regenerate.
2647 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
2649 * elf-linker-x86.h: New file.
2650 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
2651 to get x86-specific linker options.
2652 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2653 (elf_x86_64_check_relocs): Likewise.
2654 (elf_x86_64_relocate_section): Likewise.
2655 (elf_x86_64_link_setup_gnu_properties): Likewise.
2656 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
2657 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2658 (_bfd_elf_linker_x86_set_options): New function.
2659 * elfxx-x86.h: Include "elf-linker-x86.h".
2660 (elf_x86_link_hash_table): Add params.
2662 2019-04-03 Alan Modra <amodra@gmail.com>
2664 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
2665 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
2666 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
2667 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
2668 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
2669 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
2671 2019-04-02 Jim Wilson <jimw@sifive.com>
2674 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
2675 ELF header flags to after check for ELF object file. Loop through
2676 sections looking for code sections, if none, then skip ABI checks.
2678 2019-03-30 Andrew Waterman <andrew@sifive.com>
2680 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
2683 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
2685 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
2686 info->export_dynamic to the conditional.
2688 2019-03-28 Alan Modra <amodra@gmail.com>
2691 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
2692 * configure: Regenerate.
2693 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
2694 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
2695 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
2696 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
2697 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2699 2019-03-21 Jim Wilson <jimw@sifive.com>
2702 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
2703 verify sym non-NULL before using. Add identical check using h.
2705 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2707 * elf-bfd.h (struct elf_backend_data): Add argument to
2708 merge_gnu_properties.
2709 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2710 itself and while calling bed->merge_gnu_properties.
2711 (elf_merge_gnu_property_list): Update the calls for
2712 elf_merge_gnu_properties.
2713 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2714 of --force-bti warning and add argument.
2715 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2717 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2718 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2721 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2723 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2724 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2725 (elf_backend_fixup_gnu_properties): Define for AArch64.
2727 2019-03-18 Alan Modra <amodra@gmail.com>
2730 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2731 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2732 attempt at writing glink stubs only once.
2734 2019-03-16 Alan Modra <amodra@gmail.com>
2737 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2738 (_bfd_elf_rel_local_sym): Likewise.
2739 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2740 section of symbols with unrecognized shndx.
2742 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2745 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2747 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2748 in discarded section.
2750 2019-03-15 Alan Modra <amodra@gmail.com>
2753 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2754 symbol after globals if elf_bad_symtab is not set.
2756 2019-03-15 Alan Modra <amodra@gmail.com>
2759 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2760 (_bfd_elf_rel_local_sym): Likewise.
2762 2019-03-15 Alan Modra <amodra@gmail.com>
2765 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2766 object files with sh_size not a multiple of sh_entsize.
2768 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2771 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2772 input with bad relocation.
2774 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2776 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2778 2019-03-14 Nick Clifton <nickc@redhat.com>
2781 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2782 (save_section_vma): Initialise field to the number of entries in
2784 (section_vma_same): Check that the number of entries in the
2785 sec_vma table matches the number of sections in the bfd.
2787 2019-03-14 Nick Clifton <nickc@redhat.com>
2790 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2791 section owner pointer when adding the default symbol.
2793 2019-03-14 Nick Clifton <nickc@redhat.com>
2796 * elflink.c (elf_link_add_object_symbols): Add new local variable
2797 extversym_end. Initialise it to point to the end of the version
2798 symbol table, if present. Check it when initialising and updating
2801 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2803 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2804 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2805 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2806 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2808 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2809 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2810 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2812 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2813 Szabolcs Nagy <szabolcs.nagy@arm.com>
2815 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2816 (aarch64_bti_pac_info): New.
2817 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2818 (bfd_elf32_aarch64_set_options): Likewise.
2819 * bfd-in2.h: Regenerate
2820 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2821 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2822 (elfNN_aarch64_small_plt0_bti_entry): New.
2823 (elfNN_aarch64_small_plt_bti_entry): New.
2824 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2825 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2826 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2827 tlsdesc_plt_entry_size fields.
2828 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2829 (setup_plt_values): New helper function.
2830 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2832 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2834 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2835 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2836 to plt stubs instead of fixed ones and update filling them according
2837 to the need for bti.
2838 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2839 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2840 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2841 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2842 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2844 (bfd_elfNN_get_synthetic_symtab): Define.
2845 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2846 and mising BTI NOTE SECTION.
2849 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2851 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2852 linker created inputs from merge.
2853 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2854 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2855 (elfNN_aarch64_link_setup_gnu_properties): New.
2856 (elfNN_aarch64_merge_gnu_properties): New.
2857 (elf_backend_setup_gnu_properties): Define for AArch64.
2858 (elf_backend_merge_gnu_properties): Likewise.
2859 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2860 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2861 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2862 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2863 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2864 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2865 (elf_backend_parse_gnu_properties): Define for AArch64.
2867 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2870 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2871 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2873 2019-03-12 Alan Modra <amodra@gmail.com>
2875 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2876 nmemb parameter. Use bfd_alloc2.
2877 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2879 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2880 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2881 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2883 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2884 (assign_section_numbers): Style fix.
2885 (swap_out_syms): Use bfd_malloc2.
2886 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2888 (_bfd_elf_make_empty_symbol): Style fix.
2889 (elfobj_grok_stapsdt_note_1): Formatting.
2890 * elfcode.h (elf_object_p): Use bfd_alloc2.
2891 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2892 (elf_slurp_symbol_table): Use bfd_zalloc2.
2893 (elf_slurp_reloc_table): Use bfd_alloc2.
2894 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2895 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2896 size calculation doesn't overflow.
2897 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2898 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2899 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2901 2019-03-08 Alan Modra <amodra@gmail.com>
2904 * merge.c (merge_strings): Return secinfo. Don't pad section
2906 (_bfd_merge_sections): Pad section to alignment here, if input
2907 sections contributing to merged output all pad to alignment.
2910 2019-03-06 Nick Clifton <nickc@redhat.com>
2912 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2914 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2915 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2917 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2919 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2920 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2923 * elf32-s390.c (allocate_dynrelocs): Update comment.
2925 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2927 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2929 2019-02-28 Nick Clifton <nickc@redhat.com>
2932 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2933 section that is not NUL terminated.
2935 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2938 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2939 by linker when checking copy reloc on protected symbol.
2941 2019-02-24 Alan Modra <amodra@gmail.com>
2944 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2946 2019-02-20 Eric Tsai <erictsai@cadence.com>
2948 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2949 sections between the call site and call destination and adjust
2950 call distance by the largest alignment.
2952 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2954 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2955 * elf.c (elfcore_grok_aarch_pauth): New function.
2956 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2957 (elfcore_write_aarch_pauth): New function.
2958 (elfcore_write_register_note): Check for AArch64 pauth section.
2960 2019-02-20 Alan Modra <amodra@gmail.com>
2963 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2966 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2968 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2969 Darwin hosts, not just or1k.
2970 * configure: Regenerate.
2972 2019-02-20 Alan Modra <amodra@gmail.com>
2975 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2976 sentinel NUL to string buffer nearer to loop where it is used.
2977 Don't go past sentinel when scanning strings, and don't write
2979 * archive.c (do_slurp_coff_armap): Simplify string handling to
2982 2019-02-19 Alan Modra <amodra@gmail.com>
2985 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2986 attempting to prevent read past end of section.
2988 2019-02-18 Alan Modra <amodra@gmail.com>
2991 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2992 PRIx64 to generate warning messages. Print local sym names too.
2994 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2996 * elf32-arc (INIT_SYM_STRING): Delete.
2997 (FINI_SYM_STRING): Likewise.
2998 (init_str): Likewise.
2999 (fini_str): Likewise.
3001 2019-02-08 Alan Modra <amodra@gmail.com>
3003 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
3004 for bss-plt" warning to make it an error.
3006 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3009 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
3010 reloc_class_ifunc for ifunc symbols.
3011 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
3013 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
3015 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
3016 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
3018 2019-02-07 Nick Clifton <nickc@redhat.com>
3020 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
3021 into the definitely obsolete list.
3023 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
3026 * elf64-x86-64.c (elf_x86_64_need_pic): Check
3027 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
3028 (elf_x86_64_relocate_section): Move PIC check for PC-relative
3030 (elf_x86_64_check_relocs): Here.
3031 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
3032 to check if a symbol is defined in a non-shared object.
3033 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
3035 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
3037 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
3038 of 'labs' (and fix GCC warning).
3040 2019-01-25 Nick Clifton <nickc@redhat.com>
3042 * po/ru.po: Updated Russian translation.
3044 2019-01-23 Nick Clifton <nickc@redhat.com>
3046 * po/fr.po: Updated French translation.
3048 2019-01-21 Nick Clifton <nickc@redhat.com>
3050 * po/pt.po: Updated Portuguese translation.
3051 * po/uk.po: Updated Ukranian translation.
3053 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
3056 * elf32-nds32.c (nds32_relocate_section): Add space between words
3058 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
3060 (riscv_i_or_e_p): Likewise.
3061 (riscv_merge_arch_attr_info): Likewise.
3063 2019-01-19 Nick Clifton <nickc@redhat.com>
3065 * version.m4: Reset to 2.32.51
3066 * configure: Regenerate.
3067 * po/bfd.pot: Regenerate.
3069 2018-06-24 Nick Clifton <nickc@redhat.com>
3071 2.32 branch created.
3073 2019-01-16 Kito Cheng <kito@andestech.com>
3075 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
3078 2019-01-16 Kito Cheng <kito@andestech.com>
3079 Nelson Chu <nelson@andestech.com>
3081 * elfnn-riscv.c (in_subsets): New.
3082 (out_subsets): Likewise.
3083 (merged_subsets): Likewise.
3084 (riscv_std_ext_p): Likewise.
3085 (riscv_non_std_ext_p): Likewise.
3086 (riscv_std_sv_ext_p): Likewise.
3087 (riscv_non_std_sv_ext_p): Likewise.
3088 (riscv_version_mismatch): Likewise.
3089 (riscv_i_or_e_p): Likewise.
3090 (riscv_merge_std_ext): Likewise.
3091 (riscv_merge_non_std_and_sv_ext): Likewise.
3092 (riscv_merge_arch_attr_info): Likewise.
3093 (riscv_merge_attributes): Likewise.
3094 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
3096 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
3097 (elf_backend_obj_attrs_vendor): Define.
3098 (elf_backend_obj_attrs_section_type): Likewise.
3099 (elf_backend_obj_attrs_section): Likewise.
3100 (elf_backend_obj_attrs_arg_type): Define as
3101 riscv_elf_obj_attrs_arg_type.
3102 * elfxx-riscv.c (riscv_estimate_digit): New.
3103 (riscv_estimate_arch_strlen1): Likewise.
3104 (riscv_estimate_arch_strlen): Likewise.
3105 (riscv_arch_str1): Likewise.
3106 (riscv_arch_str): Likewise.
3107 * elfxx-riscv.h (riscv_arch_str): Declare.
3109 2019-01-14 John Darrington <john@darrington.wattle.id.au>
3111 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
3113 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
3114 source field. (md_apply_fix): Apply final fix
3115 to BFD_RELOC_S12Z_OPR.
3116 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
3118 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
3121 * elf32-s390.c (allocate_dynrelocs): Update comment.
3123 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
3125 * warning.m4: Adjust egrep pattern for non-GNU compilers.
3126 * configure: Regenerate.
3128 2019-01-08 Alan Modra <amodra@gmail.com>
3132 * ihex.c (ihex_write_object_contents): Properly check 32-bit
3135 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
3137 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
3138 * bfd/bfd-in2.h: Regenerate.
3139 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
3140 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
3142 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
3144 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
3145 default target, little endian target is more suitable.
3147 2019-01-04 Alan Modra <amodra@gmail.com>
3151 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
3153 (EQ_VALUE_IN_FIELD): Likewise.
3154 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
3156 2019-01-01 Alan Modra <amodra@gmail.com>
3158 Update year range in copyright notice of all files.
3160 For older changes see ChangeLog-2018
3162 Copyright (C) 2019 Free Software Foundation, Inc.
3164 Copying and distribution of this file, with or without modification,
3165 are permitted in any medium without royalty provided the copyright
3166 notice and this notice are preserved.
3172 version-control: never