1 2019-12-29 Hannes Domani <ssbssa@yahoo.de>
2 Alan Modra <amodra@gmail.com>
5 * bfd.c (bfd_update_compression_header): Write zlib header for
6 formats other than ELF too.
8 2019-12-26 Alan Modra <amodra@gmail.com>
10 * som.c (setup_sections): Don't overflow space_strings_size. Use
11 bfd_malloc2 to catch overflow of size calculation.
12 (som_prep_for_fixups): Use bfd_zalloc2 to catch overflow of size
14 (som_build_and_write_symbol_table): Similarly use bfd_zmalloc2.
15 (som_slurp_symbol_table): Similarly use bfd_zmalloc2, bfd_malloc2,
17 (bfd_som_attach_aux_hdr): Use size_t vars for string length.
18 (som_bfd_count_ar_symbols): Use bfd_malloc2 to catch overflow of
19 size calculation. Use size_t vars for length and catch overflow.
20 (som_slurp_armap): Use bfd_alloc2 to catch overflow of size
22 (som_bfd_ar_write_symbol_stuff): Similarly use bfd_zmalloc2 and
23 bfd_malloc2. Perform size calculations in bfd_size_type.
25 2019-12-26 Hannes Domani <ssbssa@yahoo.de>
27 * peicode.h (pe_bfd_read_buildid): Free data.
29 2019-12-23 Alan Modra <amodra@gmail.com>
31 * vms-alpha.c (add_symbol): Add "max" parameter. Error on string
32 length larger than max.
33 (_bfd_vms_slurp_egsd): Ensure record is at least large enough to
34 read string length byte, error if not. Pass size to add_symbol.
35 (_bfd_vms_slurp_etir): Don't read past end of buffer when reading
36 type and length. Allow read of last byte in buffer.
38 2019-12-23 Alan Modra <amodra@gmail.com>
40 * wasm-module.c (wasm_read_leb128): Don't allow oversize shifts.
41 Catch value overflow. Sign extend only on terminating byte.
43 2019-12-20 Alan Modra <amodra@gmail.com>
45 * xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
47 2019-12-20 Alan Modra <amodra@gmail.com>
49 * libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
50 declaration. Move ATTRIBUTE_UNUSED to definition.
51 (sign_extend, low_sign_extend, sign_unext, low_sign_unext),
52 (re_assemble_3, re_assemble_12, re_assemble_14, re_assemble_16),
53 (re_assemble_17, re_assemble_21, re_assemble_22): Likewise. Make
54 args and return value unsigned. Use unsigned variables.
55 (hppa_rebuild_insn): Similarly.
57 2019-12-20 Alan Modra <amodra@gmail.com>
59 * format.c (bfd_check_format_matches): Free matching_vector when
60 not returning matching target strings.
62 2019-12-20 Alan Modra <amodra@gmail.com>
64 * coff-alpha.c (alpha_ecoff_read_ar_hdr): Free ar_hdr on error return.
66 2019-12-18 Alan Modra <amodra@gmail.com>
68 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Don't overflow when
69 checking symbol count against section size. Guard against strlen
70 running off end of buffer by allocating one more byte and zeroing.
71 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
73 2019-12-18 Alan Modra <amodra@gmail.com>
75 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
76 * elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.
78 2019-12-18 Alan Modra <amodra@gmail.com>
80 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): Avoid signed overflow.
81 * elf32-hppa.c (final_link_relocate): Likewise.
82 * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): Likewise.
83 (_bfd_elf_ppc_at_tprel_transform, is_insn_ds_form): Likewise.
84 (is_insn_dq_form, ppc_elf_relocate_section): Likewise.
85 * elf64-ppc.c (ok_lo_toc_insn, ppc64_elf_edit_toc): Likewise.
86 (ppc64_elf_relocate_section): Likewise.
87 * elfxx-mips.c (mips_elf_perform_relocation): Likewise.
88 * netbsd.h (N_SET_FLAGS): Likewise.
90 2019-12-17 Alan Modra <amodra@gmail.com>
92 * coff-tic80.c: Delete file.
93 * cpu-tic80.c: Delete file.
94 * archures.c: Remove tic80 support.
95 * coffcode.h: Likewise.
96 * coffswap.h: Likewise.
97 * targets.c: Likewise.
98 * config.bfd: Likewise.
99 * configure.ac: Likewise.
100 * Makefile.am: Likewise.
101 * Makefile.in: Regenerate.
102 * bfd-in2.h: Regenerate.
103 * configure: Regenerate.
104 * po/SRC-POTFILES.in: Regenerate.
106 2019-12-13 Alan Modra <amodra@gmail.com>
109 * elf.c: (assign_file_positions_for_load_sections): Attempt to
110 keep meaningless p_offset for PT_LOAD segments without file
111 contents within file size.
113 2019-12-12 Alan Modra <amodra@gmail.com>
115 * libbfd.c (bfd_get): Don't cast result of bfd_get_8.
116 * bfd-in2.h: Regenerate.
118 2019-12-11 Alan Modra <amodra@gmail.com>
120 * elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow.
121 * libaout.h (N_SET_INFO, N_SET_FLAGS): Likewise.
122 * netbsd.h (write_object_contents): Likewise.
123 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
124 * libhppa.h (HPPA_R_CONSTANT): Don't signed extend with shifts.
125 (stm32l4xx_create_replacing_stub_vldm): Don't truncate high bits
127 * elf32-nds32.h (R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG): Define
128 using 1u shifted left. Ditto for other macros.
129 * mmo.c (LOP): Make unsigned.
131 2019-12-11 Alan Modra <amodra@gmail.com>
133 * libbfd.c (bfd_get_8): Return a bfd_vma.
134 (bfd_get_signed_8): Return a bfd_signed_vma.
135 * bfd-in2.h: Regenerate.
137 2019-12-11 Alan Modra <amodra@gmail.com>
139 * xtensa-modules.c (Field_* functions): Don't mask using shifts.
140 (Operand_soffsetx4_decode, Operand_simm4_decode),
141 (Operand_simm8_decode, Operand_simm8x256_decode),
142 (Operand_simm12b_decode, Operand_label8_decode),
143 (Operand_label12_decode, Operand_soffset_decode),
144 (Operand_xt_wbr15_label_decode, Operand_xt_wbr18_label_decode): Don't
145 sign extend using shifts.
146 (Operand_immrx4_decode, Operand_uimm16x4_decode): Avoid UB in
149 2019-12-11 Alan Modra <amodra@gmail.com>
151 * cpu-ia64-opc.c (ext_imms_scaled): Avoid undefined left shift
152 of negative values by using unsigned vars.
154 2019-12-07 Alan Modra <amodra@gmail.com>
157 * elflink.c (_bfd_elf_link_assign_sym_version): Assign versions
158 for ELF_COMMON_DEF_P symbols.
159 (elf_link_output_extsym, _bfd_elf_add_default_symbol): Adjust to
162 2019-12-05 Sandra Loosemore <sandra@codesourcery.com>
164 Only give FDE encoding warnings if --eh-frame-hdr was specified.
166 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Make
167 FDE encoding warning conditional.
169 2019-12-05 Nick Clifton <nickc@redhat.com>
172 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Ignore empty sections
173 when computing the sizes stored in the headers.
175 2019-12-03 Alan Modra <amodra@gmail.com>
178 * dwarf2.c (struct dwarf2_debug_file): Add line_table and
180 (struct abbrev_offset_entry): New.
181 (hash_abbrev, eq_abbrev, del_abbrev): New functions.
182 (read_abbrevs): Check whether we have already read abbrevs at
183 given offset, and add new offset/abbrev to hash table.
184 (decode_line_info): Keep line table at offset zero in file struct.
185 Return this for a cu reusing the same dir/file list.
186 (find_abstract_instance): Find cu for DW_FORM_GNU_ref_alt.
187 (_bfd_dwarf2_slurp_debug_info): Create offset/abbrev hash tables.
188 (_bfd_dwarf2_cleanup_debug_info): Adjust deletion of lines and
191 2019-12-03 Alan Modra <amodra@gmail.com>
194 * dwarf2.c (struct dwarf2_debug_file): New struct.
195 (struct dwarf2_debug): Delete fields now in dwarf2_debug_file.
197 (struct comp_unit): Add file field.
198 (read_indirect_string, read_indirect_line_string): Adjust to suit.
199 (read_alt_indirect_string, read_alt_indirect_ref): Likewise.
200 (read_debug_ranges, find_abstract_instance, read_rangelist): Likewise.
201 (_bfd_dwarf2_stash_syms, place_sections): Likewise.
202 (stash_maybe_update_info_hash_tablse): Likewise.
203 (stash_verify_info_hash_table): Likewise.
204 (_bfd_dwarf2_slurp_debug_info): Likewise.
205 (_bfd_dwarf2_find_symbol_bias): Likewise.
206 (_bfd_dwarf2_find_nearest_line): Likewise.
207 (_bfd_dwarf2_cleanup_debug_info): Likewise.
208 (read_abbrevs): Add file param and adjust. Update calls.
209 (stash_comp_unit): Likewise.
210 (decode_line_info): Delete stash param and adjust. Update calls.
211 (comp_unit_find_nearest_line): Likewise.
212 (comp_unit_maybe_decode_line_info): Likewise.
213 (comp_unit_find_line): Likewise.
214 (parse_comp_unit): Add file and info_ptr param and adjust. Update
217 2019-12-03 Alan Modra <amodra@gmail.com>
219 * dwarf2.c (read_indirect_string): Don't duplicate offset check
220 done in read_section.
221 (read_indirect_line_string): Likewise.
222 (read_alt_indirect_string): Likewise.
223 (read_alt_indirect_ref): Likewise.
224 (read_abbrevs): Likewise. Free memory on all failure paths.
225 Use correct unsigned type for pointer difference comparison.
227 2019-12-03 Alan Modra <amodra@gmail.com>
229 * dwarf2.c (struct dwarf2_debug): Update comments. Remove sec
231 (_bfd_dwarf2_slurp_debug_info): Don't set sec or sec_info_ptr.
232 (stash_comp_unit): Likewise.
233 (read_alt_indirect_ref): Return NULL not FALSE.
235 2019-12-03 Alan Modra <amodra@gmail.com>
237 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Correct function comment.
239 2019-11-27 Alan Modra <amodra@gmail.com>
242 * dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
244 (_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
245 returning info from the symbol table. Do the _bfd_elf_find_function
246 search also when !found. Call _bfd_dwarf2_stash_syms regardless of
248 * elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
250 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
251 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
252 * libbfd.h: Regenerate.
254 2019-11-27 Alan Modra <amodra@gmail.com>
257 * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
258 (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
259 _bfd_elf_find_function. Call _bfd_elf_find_function in cases
260 where _bfd_elf_find_nearest_line would do so.
261 * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
263 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. Tidy.
264 * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
265 (elf_backend_maybe_function_sym): Define.
266 (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
267 (bfd_elf32_find_nearest_line): Don't define.
268 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
269 (elf_backend_maybe_function_sym): Define.
270 (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
271 (bfd_elfNN_find_nearest_line): Don't define.
273 2019-11-27 Alan Modra <amodra@gmail.com>
275 * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
276 (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
277 by two before applying to insn. Correct overflow test.
278 * coff-sh.c (sh_reloc): Likewise.
280 2019-11-26 Nick Clifton <nickc@redhat.com>
282 * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
283 negative relocated value.
284 * coff-sh.c (sh_reloc): Likewise.
286 2019-11-25 Alan Modra <amodra@gmail.com>
288 * archures.c (bfd_octets_per_byte): Tail call
289 bfd_arch_mach_octets_per_byte.
290 * coff-arm.c (OCTETS_PER_BYTE): Define.
291 (coff_arm_reloc): Introduce new "octets" temp. Use OCTETS_PER_BYTE
292 with section. Correct "addr". Remove ATTRIBUTE_UNUSED.
293 * coff-i386.c (coff_i386_reloc): Similarly.
294 * coff-mips.c (mips_reflo_reloc): Similarly.
295 * coff-x86_64.c (coff_amd64_reloc): Similarly.
296 * elf32-msp430.c (OCTETS_PER_BYTE): Define.
297 (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
298 * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
299 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
300 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
301 * elf32-s12z.c (opru18_reloc): Similarly.
302 * elf32-sh.c (sh_elf_reloc): Similarly.
303 * elf32-spu.c (spu_elf_rel9): Similarly.
304 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
305 * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
306 (ppc64_elf_toc64_reloc): Similarly.
307 * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
308 * cofflink.c (_bfd_coff_link_input_bfd),
309 (_bfd_coff_reloc_link_order): Likewise.
310 * elf.c (_bfd_elf_section_offset): Likewise.
311 * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
312 (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
313 (bfd_elf_final_link): Likewise.
314 * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
315 to set SEC_ELF_OCTETS.
316 * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
317 (bfd_install_relocation): Likewise.
318 (_bfd_final_link_relocate): Don't recalculate octets.
319 * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
321 * bfd-in2.h: Regenerate.
323 2019-11-25 Christian Eggers <ceggers@gmx.de>
325 * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
326 * archures.c (bfd_octets_per_byte): New parameter sec.
327 If section is not NULL and SEC_ELF_OCTETS is set, one octet es
328 returned [ELF targets only].
329 * bfd.c (bfd_get_section_limit): Provide section parameter to
331 * bfd-in2.h: regenerate.
332 * binary.c (binary_set_section_contents): Move call to
333 bfd_octets_per_byte into section loop. Provide section parameter
334 to bfd_octets_per_byte.
335 * coff-arm.c (coff_arm_reloc): Provide section parameter
336 to bfd_octets_per_byte.
337 * coff-i386.c (coff_i386_reloc): likewise.
338 * coff-mips.c (mips_reflo_reloc): likewise.
339 * coff-x86_64.c (coff_amd64_reloc): likewise.
340 * cofflink.c (_bfd_coff_link_input_bfd): likewise.
341 (_bfd_coff_reloc_link_order): likewise.
342 * elf.c (_bfd_elf_section_offset): likewise.
343 (_bfd_elf_make_section_from_shdr): likewise.
344 Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
345 .debug*, .zdebug* and .note.gnu*.
346 * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
347 to bfd_octets_per_byte.
348 * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
349 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
350 * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
351 * elf32-s12z.c (opru18_reloc): likewise.
352 * elf32-sh.c (sh_elf_reloc): likewise.
353 * elf32-spu.c (spu_elf_rel9): likewise.
354 * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
355 * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
356 (ppc64_elf_addr16_ha_reloc): likewise.
357 (ppc64_elf_toc64_reloc): likewise.
358 * elflink.c (bfd_elf_final_link): likewise.
359 (bfd_elf_perform_complex_relocation): likewise.
360 (elf_fixup_link_order): likewise.
361 (elf_link_input_bfd): likewise.
362 (elf_link_sort_relocs): likewise.
363 (elf_reloc_link_order): likewise.
364 (resolve_section): likewise.
365 * linker.c (_bfd_generic_reloc_link_order): likewise.
366 (bfd_generic_define_common_symbol): likewise.
367 (default_data_link_order): likewise.
368 (default_indirect_link_order): likewise.
369 * srec.c (srec_set_section_contents): likewise.
370 (srec_write_section): likewise.
371 * syms.c (_bfd_stab_section_find_nearest_line): likewise.
372 * reloc.c (_bfd_final_link_relocate): likewise.
373 (bfd_generic_get_relocated_section_contents): likewise.
374 (bfd_install_relocation): likewise.
375 For section which have SEC_ELF_OCTETS set, multiply output_base
376 and output_offset with bfd_octets_per_byte.
377 (bfd_perform_relocation): likewise.
379 2019-11-21 Alan Modra <amodra@gmail.com>
381 * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
382 BFDs that have not been loaded.
384 2019-11-19 Alan Modra <amodra@gmail.com>
387 * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
388 u.syment.n_value does point at another C_FILE sym and not into
389 some auxent that happens to look like a C_FILE. Properly check
390 for integer overflow and avoid possible pointer wrap-around.
391 Simplify pr17512 checks.
393 2019-11-19 Alan Modra <amodra@gmail.com>
396 * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
397 * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
399 2019-11-18 Alan Modra <amodra@gmail.com>
401 * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
402 Rename from elf_backend_post_process_headers.
403 (_bfd_elf_post_process_headers): Delete.
404 (_bfd_elf_init_file_header): Declare.
405 * elf.c (_bfd_elf_compute_section_file_positions): Call new function
406 in place of prep_headers and elf_backend_post_process_headers.
407 (_bfd_elf_init_file_header): Renamed from prep_headers with
408 updated args and made global. Delete dead code.
409 (_bfd_elf_post_process_headers): Delete.
410 * elf32-arm.c (elf32_arm_init_file_header): Rename from
411 elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
413 (elf_backend_init_file_header): Define.
414 (elf_backend_post_process_headers): Don't define.
415 * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
416 * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
417 * elf32-metag.c (elf_metag_init_file_header): Similarly.
418 * elf32-spu.c (spu_elf_init_file_header
419 * elf32-visium.c (visium_elf_init_file_header
420 * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
421 * elf64-hppa.c (elf64_hppa_init_file_header
422 * elf64-ia64-vms.c (elf64_vms_init_file_header
423 * elfnn-aarch64.c (elfNN_aarch64_init_file_header
424 * elfnn-ia64.c (elfNN_hpux_init_file_header
425 * elfxx-mips.c (_bfd_mips_init_file_header
426 * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
427 (_bfd_mips_init_file_header): Declare.
428 (elf_backend_post_process_headers): Delete.
429 (elf_backend_init_file_header): Define.
430 * elfxx-target.h (elf_backend_post_process_headers): Delete.
431 (elf_backend_init_file_header): Define and use.
432 * elf32-m68hc12.c (elf_backend_init_file_header): Define.
433 (elf_backend_post_process_headers): Don't define.
434 * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
435 (elf32_m68hc11_init_file_header): Declare.
436 * elf32-ppc.c (elf_backend_post_process_headers): Remove
439 2019-11-18 Alan Modra <amodra@gmail.com>
441 * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
442 Rename from elf_backend_modify_program_headers.
443 (_bfd_elf_modify_headers): Declare.
444 * elf.c (assign_file_positions_except_relocs): Set
445 elf_program_header_size. Always call elf_backend_modify_headers.
446 Extract code modifying file header..
447 (_bfd_elf_modify_headers): ..to here. New function.
448 * elf32-arm.c (elf_backend_modify_headers): Renamed from
449 elf_backend_modify_program_headers.
450 * elf32-i386.c: Similarly.
451 * elf64-x86-64.c: Similarly.
452 * elfxx-target.h: Similarly. Default elf_backend_modify_headers
453 to _bfd_elf_modify_headers.
454 * elf-nacl.h (nacl_modify_headers): Rename from
455 nacl_modify_program_headers.
456 * elf-nacl.c (nacl_modify_headers): Rename from
457 nacl_modify_program_headers and call _bfd_elf_modify_headers.
458 * elf32-rx.c (elf32_rx_modify_headers): Similarly.
459 * elf32-spu.c (spu_elf_modify_headers): Similarly.
460 * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
461 * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
463 2019-11-18 Alan Modra <amodra@gmail.com>
466 * bfd.c (bfd_error_type): Add bfd_error_sorry.
467 (bfd_errmsgs): Likewise.
468 * elf.c (rewrite_elf_program_header): Don't abort on confused
469 lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
470 (_bfd_elf_validate_reloc): Use bfd_error_sorry.
471 (_bfd_elf_final_write_processing): Likewise.
472 * bfd-in2.h: Regenerate.
474 2019-11-12 Jim Wilson <jimw@sifive.com>
477 * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
478 foff. If sym_sec->output_section and sec->output_section are the same
479 and not *ABS* then set max_alignment to that section's alignment.
481 2019-11-07 Alan Modra <amodra@gmail.com>
483 * cpu-cr16c.c: Delete.
484 * elf32-cr16c.c: Delete.
490 * targets.c: Remove cr16c support.
495 * po/SRC-POTFILES.in: Regenerate.
497 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
499 * doc/chew.c (add_to_definition): Use correct type when
500 calculating size of array reallocation.
501 (nextword): Always initialise the word return parameter.
502 (compile): Check return value of nextword().
504 2019-10-30 Keith Seitz <keiths@redhat.com>
506 * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
508 (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
510 (elf_read_notes): Add declaration.
511 * elf.c (elf_read_notes): Move elf-bfd.h.
512 (_bfd_elf_core_find_build_id): New function.
513 (bfd_section_from_phdr): Scan core file PT_LOAD segments for
514 build-id if none is known.
515 (elf_parse_notes): For core files, scan for notes.
516 * elfcore.h (elf_core_file_matches_executable_p): If both
517 BFDs have identical build-ids, then they match.
518 (_bfd_elf_core_find_build_id): New function.
519 * elfxx-target.h (elf_backend_core_find_build_id): Define.
520 (elfNN_bed): Add elf_backend_core_find_build_id.
522 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
524 * libcoff-in.h (struct pe_tdata): Add dos_message field.
525 * libcoff.h: Regenerate.
526 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
527 dos_message field rather than initialising it.
528 (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
530 * peicode.h (pe_mkobject): Initialise the dos_message field.
531 (pe_mkobject_hook): Copy the dos_message field.
532 (pe_bfd_object_p): Copy the dos_message field.
534 2019-10-25 Alan Modra <amodra@gmail.com>
537 * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
539 * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
541 * elf.c (elf_sort_segments): New function.
542 (assign_file_positions_except_relocs): Use shortcuts to elfheader
543 and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
544 headers. Move PT_PHDR check..
545 (assign_file_positions_for_non_load_sections): ..and code setting
546 PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
547 (assign_file_positions_for_load_sections): ..to here. Sort
548 PT_LOAD headers. Delete header_pad code. Use actual number of
549 headers rather than allocated in calculating size for program
550 headers. Don't assume program headers follow ELF file header.
551 Simplify pt_load_count code. Only set "off" for PT_LOAD or
553 (rewrite_elf_program_header): Set p_vaddr_offset for segments
554 that include file and program headers.
555 (copy_elf_program_header): Likewise, replacing header_size code.
557 2019-10-21 Alan Modra <amodra@gmail.com>
560 * archive.c (normalize): Return file unchanged when
561 BFD_ARCHIVE_FULL_PATH.
562 (_bfd_construct_extended_name_table): Pass abfd, the output
564 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
565 * bfd.c (struct bfd): Make flags a full flagword.
566 (BFD_ARCHIVE_FULL_PATH): Define.
567 * bfd-in2.h: Regenerate.
569 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
571 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
572 minimum alignment for .plt section.
574 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
576 * elf32-hppa.c: Revise import stub sequences.
577 (LONG_BRANCH_STUB_SIZE): Define.
578 (LONG_BRANCH_SHARED_STUB_SIZE): Define.
579 (IMPORT_STUB_SIZE): Define.
580 (IMPORT_SHARED_STUB_SIZE): Define.
581 (EXPORT_STUB_SIZE): Define.
582 (plt_stub): Revise to not use register %r22.
583 (LDO_R1_R22): Define.
584 (LDW_R22_R21): Define.
585 (LDW_R22_R19): Define.
586 (hppa_build_one_stub): Update stub generation and use new defines.
587 (hppa_size_one_stub): Likewise.
589 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
591 * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
592 that user should recompile their code with `fPIC` when linking non-pic
593 code into shared library.
595 * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
596 the error message if needed, and then store the result into the
597 `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
598 message for the dangerous relocation should be set before we call the
599 callback function. If we miss the error message since linker runs out
600 of memory, we should set the default error message for the error.
602 2019-10-16 Alan Modra <amodra@gmail.com>
605 * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
606 for all ppc arch info.
607 * linker.c (default_data_link_order): Pass info->big_endian to
608 arch_info->fill function.
610 2019-10-15 Alan Modra <amodra@gmail.com>
612 * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
613 (elf32_m68hc11_relocate_section): Don't use a variable for format
614 strings. Delete some unnecessary xgettext:c-format comments.
616 2019-10-15 Alan Modra <amodra@gmail.com>
619 * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
621 * elf32-m68hc1x.c (reloc_warning): New function.
622 (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
623 corresponding to %lx in format strings.
624 * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
626 2019-10-15 Alan Modra <amodra@gmail.com>
629 * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
631 2019-10-15 Alan Modra <amodra@gmail.com>
633 * bfd.c (bfd_check_compression_header): Check for powers of two
636 2019-10-14 Alan Modra <amodra@gmail.com>
638 * syms.c (struct indexentry): Add idx field.
639 (cmpindexentry): Final sort on idx.
640 (_bfd_stab_section_find_nearest_line): Set idx.
642 2019-10-14 Alan Modra <amodra@gmail.com>
644 * dwarf2.c (struct lookup_funcinfo): Add idx field.
645 (compare_lookup_funcinfos): Perform final sort on idx.
646 (build_lookup_funcinfo_table): Set idx.
647 (compare_sequences): Perform final sort on num_lines.
648 (build_line_info_table): Set num_lines and line_info_lookup earlier.
649 (sort_line_sequences): Set num_lines for sort.
651 2019-10-14 Alan Modra <amodra@gmail.com>
653 * elflink.c (elf_sort_symbol): Sort on type and name as well.
654 (elf_link_add_object_symbols): Style fix.
656 2019-10-14 Alan Modra <amodra@gmail.com>
658 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
659 for sections about to be sorted.
660 (assign_file_positions_for_load_sections): Likewise.
661 (elf_sort_sections): Don't bother optimising both TOEND case.
662 * elflink.c (bfd_elf_final_link): Reset target_index.
664 2019-10-14 Alan Modra <amodra@gmail.com>
666 * elflink.c (elf_get_linked_section_vma): Delete.
667 (compare_link_order): Use elf_linked_to_section and sort by lma,
669 (elf_fixup_link_order): Use size_t variables where appropriate.
670 Make use of elf_linked_to_section. Formatting. Properly align
673 2019-10-14 Alan Modra <amodra@gmail.com>
675 * elf-strtab.c (strrevcmp): Comment.
676 * merge.c (strrevcmp): Likewise.
677 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
678 Comment on why comparing pointers ensures a stable sort.
679 * elflink.c (struct elf_symbol): Add void* to union.
680 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
681 (elf_sym_name_compare): Likewise.
682 (bfd_elf_match_symbols_in_sections): Style fix.
683 (elf_link_sort_cmp1): Comment.
685 2019-10-14 Alan Modra <amodra@gmail.com>
688 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
689 return value of bfd_alloc2.
690 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
691 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
692 value of bfd_get_section_contents.
693 * som.c (som_write_space_strings): Don't use xmalloc.
694 (som_write_symbol_strings): Likewise.
696 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
698 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
699 stash->info_hash_status = STASH_INFO_HASH_ON when
700 stash_maybe_update_info_hash_tables succeeds.
702 2019-10-09 Alan Modra <amodra@gmail.com>
705 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
706 total_size calculation.
708 2019-10-08 Alan Modra <amodra@gmail.com>
711 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
712 recur_count. Error on recur_count reaching 100 rather than
713 info_ptr matching orig_info_ptr. Adjust calls.
715 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
717 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
718 (elf32_msp430_merge_msp430_attributes): Add support for merging
719 the GNU object attribute for data region.
721 2019-10-07 Alan Modra <amodra@gmail.com>
723 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
724 space for local got non-tls relocs when PIE.
726 2019-10-07 Alan Modra <amodra@gmail.com>
728 * elflink.c (elf_fixup_link_order): Don't attempt to find
729 an elf_section for linker created bfd sections.
731 2019-10-07 Alan Modra <amodra@gmail.com>
733 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
734 with non-local symbol. Don't double count __tls_get_addr calls
736 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
738 2019-10-07 Alan Modra <amodra@gmail.com>
740 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
742 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
744 2019-10-04 Alan Modra <amodra@gmail.com>
746 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
747 (ppc64_elf_tls_optimize): Correct is_local condition.
748 (allocate_got): Don't reserve dynamic relocations for any of the
749 tls got relocs in PIEs when the symbol is local.
750 (allocate_dynrelocs): Correct validity test for local sym using
752 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
753 for any of the tls got relocs in PIEs.
754 (ppc64_elf_layout_multitoc): Likewise.
755 (ppc64_elf_relocate_section): Correct validity test for local sym
756 using tlsld_got slot. Don't emit dynamic relocations for any of
757 the tls got relocs in PIEs when the symbol is local.
758 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
759 (got_relocs_needed): Delete.
760 (allocate_dynrelocs): Correct validity test for local sym using
761 tlsld_got slot. Don't reserve dynamic relocations for any of the
762 tls got relocs in PIEs when the symbol is local.
763 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
764 for any of the tls got relocs in PIEs.
765 (ppc_elf_relocate_section): Correct validity test for local sym
766 using tlsld_got slot. Don't emit dynamic relocations for any of
767 the tls got relocs in PIEs when the symbol is local.
769 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
773 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
774 bfd_link_pic for TLS checks.
775 (elf32_arm_final_link_relocate): Likewise.
776 (allocate_dynrelocs_for_symbol): Likewise.
778 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
781 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
783 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
785 * elf-bfd.h (bfd_section_is_ctf): New inline function.
786 * elf.c (special_sections_c): Add ".ctf".
787 (assign_file_positions_for_non_load_sections): Note that
788 compressed debugging sections etc are not assigned here. Treat
789 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
791 (assign_file_positions_except_relocs): Likewise.
792 (find_section_in_list): Note that debugging and CTF sections, as
793 well as reloc sections, are assigned later.
794 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
795 their size and contents updated.
796 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
797 compressed sections, they have no uncompressed content to copy at
799 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
800 callback right before the strtab is written out.
801 (bfd_elf_final_link): Don't cache the section contents of CTF
802 sections: they are not populated yet. Call the emit_ctf callback
803 right at the end, after all the symbols and strings are flushed
806 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
808 * elf-strtab.c (_bfd_elf_strtab_len): New.
809 (_bfd_elf_strtab_str): Likewise.
810 * bfd-elf.h: Declare them.
812 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
814 * elf-bfd.h (bfd_elf_get_str_section): Add.
815 * elf.c (bfd_elf_get_str_section): No longer static.
817 2019-09-26 Alan Modra <amodra@gmail.com>
820 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
821 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
822 ${bindir}/../lib/bfd-plugins if different.
823 * Makefile.in: Regenerate.
825 2019-09-23 Alan Modra <amodra@gmail.com>
827 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
828 in choosing between different actions for shared library and
829 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
830 (dec_dynrel_count): Likewise. Account for ifunc special case.
831 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
833 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
836 2019-09-23 Alan Modra <amodra@gmail.com>
838 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
839 * Makefile.in: Regenerate.
840 * po/SRC-POTFILES.in: Regenerate.
842 2019-09-23 Alan Modra <amodra@gmail.com>
844 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
845 (bfd_elf_version_tree): Delete forward declarations.
846 Move other forward decls and remaining elf function decl later.
847 (bfd_section_already_linked_table_init),
848 (bfd_section_already_linked_table_free),
849 (_bfd_handle_already_linked, _bfd_nearby_section),
850 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
852 2019-09-23 Alan Modra <amodra@gmail.com>
854 * bfd-in.h: Move ecoff function declarations..
855 * ecoff-bfd.h: ..to here, new file.
856 * ecoff.c: Include ecoff-bfd.h.
857 * ecofflink.c: Likewise.
858 * elf64-alpha.c: Likewise.
859 * elfxx-mips.c: Likewise.
860 * bfd-in2.h: Regenerate.
862 2019-09-23 Alan Modra <amodra@gmail.com>
864 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
865 Move most other elf declarations..
866 * elf-bfd.h: ..to here.
867 * bfd-in2.h: Regenerate.
869 2019-09-23 Alan Modra <amodra@gmail.com>
871 * bfd-in.h: Move m68k function declaration..
872 * cpu-m68k.h: ..to here, new file..
873 * elf32-m68k.h: ..and here, new file.
874 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
875 * bfd-in2.h: Regenerate.
877 2019-09-23 Alan Modra <amodra@gmail.com>
879 * bfd-in.h: Move bfin function declaration..
880 * elf32-bfin.h: ..to here, new file.
881 * elf32-bfin.c: Include elf32-bfin.h.
882 * bfd-in2.h: Regenerate.
884 2019-09-23 Alan Modra <amodra@gmail.com>
886 * bfd-in.h: Move cr16 function declaration..
887 * elf32-cr16.h: ..to here, new file.
888 * elf32-cr16.c: Include elf32-cr16.h.
889 * bfd-in2.h: Regenerate.
891 2019-09-23 Alan Modra <amodra@gmail.com>
893 * bfd-in.h (bfd_sunos_get_needed_list),
894 (bfd_sunos_record_link_assignment),
895 (bfd_sunos_size_dynamic_sections),
896 (bfd_i386linux_size_dynamic_sections),
897 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
898 * bfd-in2.h: Regenerate.
900 2019-09-23 Alan Modra <amodra@gmail.com>
902 * bfd-in.h: Move xcoff function declarations..
903 * xcofflink.h: ..to here, new file.
904 * xcofflink.c: Include xcofflink.h.
905 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
906 * bfd-in2.h: Regenerate.
908 2019-09-23 Alan Modra <amodra@gmail.com>
910 * bfd-in.h: Delete coff forward refs and move coff declaration..
911 * coff-bfd.h: ..to here.
912 * bfd-in2.h: Regenerate.
914 2019-09-23 Alan Modra <amodra@gmail.com>
916 * bfd-in.h: Move arm declaraions..
917 * cpu-arm.h: ..to here, new file..
918 * coff-arm.h: ..and here, new file..
919 * elf32-arm.h: ..and here, new file.
920 * cpu-arm.c: Include cpu-arm.h.
921 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
922 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
923 * pe-arm.c: Move function rename defines later.
924 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
925 * bfd-in2.h: Regenerate.
927 2019-09-23 Alan Modra <amodra@gmail.com>
929 * bfd-in.h: Move tic6x function declaration..
930 * elf32-tic6x.h: ..to here.
931 * bfd-in2.h: Regenerate.
933 2019-09-23 Alan Modra <amodra@gmail.com>
935 * bfd-in.h: Move aarch64 declarations and defines..
936 * cpu-aarch64.h: ..to here, new file..
937 * elfxx-aarch64.h: ..and here.
938 * cpu-aarch64.c: Include cpu-aarch64.h.
939 * elfnn-aarch64.c: Likewise.
940 * bfd-in2.h: Regenerate.
942 2019-09-23 Alan Modra <amodra@gmail.com>
944 * bfd-in.h: Delete ticoff function declarations.
945 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
946 (bfd_ticoff_get_section_load_page): Make static.
947 * bfd-in2.h: Regenerate.
949 2019-09-23 Alan Modra <amodra@gmail.com>
951 * bfd-in.h: Move h8300 function declaration to..
952 * cpu-h8300.h: ..here, new file.
953 * cpu-h8300.c: Include cpu-h8300.h.
954 * elf32-h8300.c: Likewise.
955 * bfd-in2.h: Regenerate.
957 2019-09-23 Alan Modra <amodra@gmail.com>
959 * bfd-in.h: Move ia64 function declarations..
960 * elfxx-ia64.h: ..to here.
961 * bfd-in2.h: Regenerate.
963 2019-09-23 Alan Modra <amodra@gmail.com>
965 * bfd-in.h: Move v850 function declarations..
966 * elf32-v850.h: ..to here, new file.
967 * elf32-v850.c: Include elf32-v850.h.
968 * bfd-in2.h: Regenerate.
970 2019-09-23 Alan Modra <amodra@gmail.com>
972 * bfd-in.h: Move mips function declaration to..
973 * elfxx-mips.h: ..here.
974 * bfd-in2.h: Regenerate.
976 2019-09-23 Alan Modra <amodra@gmail.com>
978 * bfd-in.h: Move csky function declarations to..
979 * elf32-csky.h: ..here, new file.
980 * elf32-csky.c: Include elf32-csky.h.
981 * bfd-in2.h: Regenerate.
983 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
985 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
986 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
987 Set undefined_weak field from it.
988 (relax_func_t): New parameter undefined_weak.
989 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
990 (_bfd_riscv_relax_tls_le): Likewise.
991 (_bfd_riscv_relax_align): Likewise.
992 (_bfd_riscv_relax_delete): Likewise.
993 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
994 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
995 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
996 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
997 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
999 (_bfd_riscv_relax_section): New local undefined_weak. Set for
1000 undef weak relocs that can be relaxed. Pass to relax_func call.
1002 2019-09-20 Alan Modra <amodra@gmail.com>
1004 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
1005 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
1006 (bfd_section_userdata, bfd_is_com_section, discarded_section),
1007 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
1008 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
1009 (bfd_section_list_remove, bfd_section_list_append),
1010 (bfd_section_list_prepend, bfd_section_list_insert_after),
1011 (bfd_section_list_insert_before, bfd_section_removed_from_list):
1012 New inline functions.
1013 * section.c (bfd_is_und_section, bfd_is_abs_section),
1014 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
1015 (bfd_section_list_append, bfd_section_list_prepend),
1016 (bfd_section_list_insert_after, bfd_section_list_insert_before),
1017 (bfd_section_removed_from_list): Delete macros.
1018 (bfd_section_name, bfd_section_size, bfd_section_vma),
1019 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
1020 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
1021 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
1022 (discarded_section): New inline functions.
1023 * bfd-in2.h: Regenerate.
1025 2019-09-20 Alan Modra <amodra@gmail.com>
1027 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1028 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
1029 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1030 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
1031 * targets.c (bfd_asymbol_flavour): Likewise.
1032 * bfd-in2.h: Regenerate.
1034 2019-09-20 Alan Modra <amodra@gmail.com>
1036 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
1037 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
1038 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
1039 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
1040 (bfd_get_file_flags, bfd_applicable_file_flags),
1041 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
1042 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
1043 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
1044 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
1045 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
1046 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
1047 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
1048 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
1049 (bfd_usrdata, bfd_set_usrdata): New inline functions.
1050 * targets.c (bfd_get_target, bfd_get_flavour),
1051 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
1052 (bfd_little_endian, bfd_header_big_endian),
1053 (bfd_header_little_endian, bfd_applicable_section_flags),
1054 (bfd_get_symbol_leading_char): New inline functions.
1055 * bfd-in2.h: Regenerate.
1057 2019-09-20 Alan Modra <amodra@gmail.com>
1059 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
1060 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
1063 2019-09-18 Alan Modra <amodra@gmail.com>
1065 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
1066 (bfd_get_section_lma, bfd_get_section_alignment),
1067 (bfd_get_section_size, bfd_get_section_flags),
1068 (bfd_get_section_userdata): Delete.
1069 (bfd_section_name, bfd_section_size, bfd_section_vma),
1070 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
1071 (bfd_section_flags, bfd_section_userdata): New.
1072 (bfd_is_com_section): Rename parameter.
1073 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
1074 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
1075 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
1076 (bfd_set_section_lma): New.
1077 * bfd-in2.h: Regenerate.
1078 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
1080 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
1081 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
1082 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
1083 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
1084 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
1085 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
1086 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
1087 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
1088 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
1089 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
1090 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1091 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
1092 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
1093 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
1094 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1095 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1096 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
1097 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1098 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1099 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1100 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
1101 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1102 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
1103 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
1104 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
1105 * xcofflink.c: Update throughout for bfd section macro and function
1108 2019-09-18 Alan Modra <amodra@gmail.com>
1110 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
1111 (bfd_get_output_section): Delete.
1112 (bfd_asymbol_base): Delete.
1113 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
1114 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
1115 (bfd_set_asymbol_name): New macro.
1116 * bfd-in2.h: Regenerate.
1117 * aout-cris.c: Update throughout to use bfd_asymbol_section.
1118 * aoutx.h: Likewise.
1119 * cofflink.c: Likewise.
1120 * dwarf2.c: Likewise.
1121 * ecoff.c: Likewise.
1123 * elf32-arm.c: Likewise.
1124 * elf32-mips.c: Likewise.
1125 * elf32-score.c: Likewise.
1126 * elf32-score7.c: Likewise.
1127 * elfn32-mips.c: Likewise.
1128 * elfnn-aarch64.c: Likewise.
1129 * elfxx-mips.c: Likewise.
1130 * linker.c: Likewise.
1131 * pdp11.c: Likewise.
1132 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
1134 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
1136 * Makefile.in: Re-generate.
1137 * configure: Re-generate.
1138 * doc/Makefile.in: Re-generate.
1140 2019-09-18 Alan Modra <amodra@gmail.com>
1142 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
1144 * pdp11.c (slurp_symbol_table): Likewise.
1145 * som.c (som_slurp_symbol_table): Likewise.
1146 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
1147 * coffcode.h (coff_slurp_symbol_table): Likewise.
1148 * cofflink.c (_bfd_coff_final_link): Likewise.
1149 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
1150 (_bfd_ecoff_slurp_symbolic_info): Likewise.
1151 (_bfd_ecoff_slurp_symbol_table): Likewise.
1152 (_bfd_ecoff_bfd_final_link): Likewise.
1153 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
1154 * elflink.c (elf_link_output_symstrtab): Likewise.
1155 (bfd_elf_final_link): Likewise.
1156 * peicode.h (pe_ILF_build_a_bfd): Likewise.
1157 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1158 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
1159 start_address or symcount using bfd_get macros.
1160 * coffgen.c (coff_real_object_p): Likewise.
1161 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
1162 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
1163 * elfcore.h (elf_core_file_p): Don't set start_address using
1165 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
1166 using bfd_get macro.
1167 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
1168 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
1169 or symcount using bfd_get macros.
1170 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
1171 * syms.c (bfd_set_symtab): Likewise.
1172 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
1173 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
1175 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
1176 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1177 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
1178 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1179 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1180 * som.c (som_slurp_armap): Likewise.
1182 2019-09-18 Alan Modra <amodra@gmail.com>
1184 * archures.c (bfd_get_arch): Make param const.
1185 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
1186 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
1187 * bfd-in2.h: Regenerate.
1189 2019-09-18 Alan Modra <amodra@gmail.com>
1191 * bfd-in.h (carsym.name): Make const.
1192 * reloc.c (struct reloc_howto_struct.name): Likewise.
1193 * targets.c (bfd_target.name): Likewise.!
1194 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
1195 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
1196 when setting carsym.name.
1197 * bfd-in2.h: Regenerate.
1199 2019-09-18 Alan Modra <amodra@gmail.com>
1201 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
1202 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
1203 error status. Adjust calls.
1204 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
1205 Close bfd on failure. Replace xstrdup/bfd_alloc use with
1206 bfd_malloc. Use bfd_set_filename.
1208 2019-09-18 Alan Modra <amodra@gmail.com>
1210 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
1211 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
1212 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
1213 needs_copy even if all relocs are in rw sections.
1214 (dec_dynrel_count): Handle TOC16 relocs.
1215 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
1216 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
1219 2019-09-16 Phil Blundell <pb@pbcl.net>
1221 * version.m4: Set version to 2.33.50.
1222 * Makefile.in, configure, doc/Makefile.in: Regenerated.
1224 2019-09-11 Tom Tromey <tom@tromey.com>
1226 * opncls.c (bfd_set_filename): New function.
1227 * bfd-in2.h: Regenerate.
1229 2019-09-11 Alan Modra <amodra@gmail.com>
1231 * targets.c (struct bfd_target): Add _bfd_group_name.
1232 (BFD_JUMP_TABLE): Likewise.
1233 * coffgen.c (bfd_coff_group_name): New function.
1234 * elf.c (bfd_elf_group_name): New function.
1235 * linker.c (_bfd_nolink_bfd_group_name): New function.
1236 * section.c (bfd_generic_group_name): New function.
1237 * elf-bfd.h (bfd_elf_group_name): Declare.
1238 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
1239 * libcoff-in.h (bfd_coff_group_name): Declare.
1240 * aout-target.h (MY_bfd_group_name): Define.
1241 * aout-tic30.c (MY_bfd_group_name): Define.
1242 * bfd.c (bfd_group_name): Define.
1243 * binary.c (binary_bfd_group_name): Define.
1244 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
1245 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
1246 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
1247 * coffcode.h (coff_bfd_group_name): Define.
1248 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
1249 * i386msdos.c (msdos_bfd_group_name): Define.
1250 * ihex.c (ihex_bfd_group_name): Define.
1251 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
1252 * mmo.c (mmo_bfd_group_name): Define.
1253 * pef.c (bfd_pef_bfd_group_name): Define.
1254 * plugin.c (bfd_plugin_bfd_group_name): Define.
1255 * ppcboot.c (ppcboot_bfd_group_name): Define.
1256 * som.c (som_bfd_group_name): Define.
1257 * srec.c (srec_bfd_group_name): Define.
1258 * tekhex.c (tekhex_bfd_group_name): Define.
1259 * verilog.c (verilog_bfd_group_name): Define.
1260 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
1261 * xsym.c (bfd_sym_bfd_group_name): Define.
1262 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
1263 (rs6000_xcoff64_aix_vec): Likewise.
1264 * bfd-in2.h: Regenerate.
1265 * libbfd.h: Regenerate.
1266 * libcoff.h: Regenerate.
1268 2019-09-10 Nick Clifton <nickc@redhat.com>
1271 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
1273 (bfd_default_arch_struct): Initialise the new field.
1274 * bfd-in2.h: Regenerate.
1275 * cpu-aarch64.c: Initialise the new field.
1276 * cpu-alpha.c: Likewise.
1277 * cpu-arc.c: Likewise.
1278 * cpu-arm.c: Likewise.
1279 * cpu-avr.c: Likewise.
1280 * cpu-bfin.c: Likewise.
1281 * cpu-bpf.c: Likewise.
1282 * cpu-cr16.c: Likewise.
1283 * cpu-cr16c.c: Likewise.
1284 * cpu-cris.c: Likewise.
1285 * cpu-crx.c: Likewise.
1286 * cpu-csky.c: Likewise.
1287 * cpu-d10v.c: Likewise.
1288 * cpu-d30v.c: Likewise.
1289 * cpu-dlx.c: Likewise.
1290 * cpu-epiphany.c: Likewise.
1291 * cpu-fr30.c: Likewise.
1292 * cpu-frv.c: Likewise.
1293 * cpu-ft32.c: Likewise.
1294 * cpu-h8300.c: Likewise.
1295 * cpu-hppa.c: Likewise.
1296 * cpu-i386.c: Likewise.
1297 * cpu-ia64.c: Likewise.
1298 * cpu-iamcu.c: Likewise.
1299 * cpu-ip2k.c: Likewise.
1300 * cpu-iq2000.c: Likewise.
1301 * cpu-k1om.c: Likewise.
1302 * cpu-l1om.c: Likewise.
1303 * cpu-lm32.c: Likewise.
1304 * cpu-m10200.c: Likewise.
1305 * cpu-m10300.c: Likewise.
1306 * cpu-m32c.c: Likewise.
1307 * cpu-m32r.c: Likewise.
1308 * cpu-m68hc11.c: Likewise.
1309 * cpu-m68hc12.c: Likewise.
1310 * cpu-m68k.c: Likewise.
1311 * cpu-m9s12x.c: Likewise.
1312 * cpu-m9s12xg.c: Likewise.
1313 * cpu-mcore.c: Likewise.
1314 * cpu-mep.c: Likewise.
1315 * cpu-metag.c: Likewise.
1316 * cpu-microblaze.c: Likewise.
1317 * cpu-mips.c: Likewise.
1318 * cpu-mmix.c: Likewise.
1319 * cpu-moxie.c: Likewise.
1320 * cpu-msp430.c: Likewise.
1321 * cpu-mt.c: Likewise.
1322 * cpu-nds32.c: Likewise.
1323 * cpu-nfp.c: Likewise.
1324 * cpu-nios2.c: Likewise.
1325 * cpu-ns32k.c: Likewise.
1326 * cpu-or1k.c: Likewise.
1327 * cpu-pdp11.c: Likewise.
1328 * cpu-pj.c: Likewise.
1329 * cpu-plugin.c: Likewise.
1330 * cpu-powerpc.c: Likewise.
1331 * cpu-pru.c: Likewise.
1332 * cpu-riscv.c: Likewise.
1333 * cpu-rl78.c: Likewise.
1334 * cpu-rs6000.c: Likewise.
1335 * cpu-rx.c: Likewise.
1336 * cpu-s12z.c: Likewise.
1337 * cpu-s390.c: Likewise.
1338 * cpu-score.c: Likewise.
1339 * cpu-sh.c: Likewise.
1340 * cpu-sparc.c: Likewise.
1341 * cpu-spu.c: Likewise.
1342 * cpu-tic30.c: Likewise.
1343 * cpu-tic4x.c: Likewise.
1344 * cpu-tic54x.c: Likewise.
1345 * cpu-tic6x.c: Likewise.
1346 * cpu-tic80.c: Likewise.
1347 * cpu-tilegx.c: Likewise.
1348 * cpu-tilepro.c: Likewise.
1349 * cpu-v850.c: Likewise.
1350 * cpu-v850_rh850.c: Likewise.
1351 * cpu-vax.c: Likewise.
1352 * cpu-visium.c: Likewise.
1353 * cpu-wasm32.c: Likewise.
1354 * cpu-xc16x.c: Likewise.
1355 * cpu-xgate.c: Likewise.
1356 * cpu-xstormy16.c: Likewise.
1357 * cpu-xtensa.c: Likewise.
1358 * cpu-z80.c: Likewise.
1359 * cpu-z8k.c: Likewise.
1361 2019-09-09 Phil Blundell <pb@pbcl.net>
1363 binutils 2.33 branch created.
1365 2019-09-06 Alan Modra <amodra@gmail.com>
1367 * aout-target.h (object_p): Formatting.
1368 * bfd-in.h (bfd_get_filename): Don't cast to char*.
1369 * corefile.c (generic_core_file_matches_executable_p): Constify
1370 variables and remove cast.
1371 * bfd-in2.h: Regenerate.
1373 2019-09-05 Alan Modra <amodra@gmail.com>
1375 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
1376 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
1377 in the GOT/PLT entry rather than affecting the offset to that
1379 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
1381 2019-09-05 Alan Modra <amodra@gmail.com>
1383 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
1384 in second instruction.
1385 (ppc64_elf_relocate_section): Likewise.
1387 2019-09-05 Alan Modra <amodra@gmail.com>
1390 * libbfd-in.h (bfd_strdup): New inline function.
1391 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
1393 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
1394 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
1396 (bfd_openstreamr): Use bfd_strdup.
1397 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
1398 * plugin.c (try_load_plugin): Use bfd_malloc.
1399 * libbfd.h: Regenerate.
1401 2019-09-02 Alan Modra <amodra@gmail.com>
1404 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
1406 (read_alt_indirect_string): Likewise.
1407 (read_alt_indirect_ref): Likewise.
1409 2019-08-31 Jim Wilson <jimw@sifive.com>
1412 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
1413 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
1415 2019-08-30 Jim Wilson <jimw@sifive.com>
1417 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
1418 error, call bfd_set_error, set ret to FALSE, and goto out label.
1420 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
1423 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
1424 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
1426 2019-08-29 Alan Modra <amodra@gmail.com>
1429 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
1430 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
1431 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
1434 2019-08-29 Alan Modra <amodra@gmail.com>
1436 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
1437 on second insn, return it in poff.
1438 (ppc64_elf_relocate_section): Add offset to paddi addend for
1441 2019-08-28 Jim Wilson <jimw@sifive.com>
1443 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
1444 section when setting max_alignment. Update comment.
1445 (_bfd_riscv_relax_pc): Likewise.
1447 2019-08-29 Alan Modra <amodra@gmail.com>
1450 * bfd.c (struct bfd): Add no_element_cache.
1451 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
1452 archive cache when no_element_cache.
1453 (bfd_generic_archive_p): Set no_element_cache when opening first
1454 element to check format. Close first element too.
1455 (do_slurp_bsd_armap): Don't zero ardata->cache here.
1456 * bfd-in2.h: Regenerate.
1458 2019-08-24 Alan Modra <amodra@gmail.com>
1460 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
1461 symbols from GOT optimisation.
1463 2019-08-23 Stafford Horne <shorne@gmail.com>
1465 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
1468 2019-08-23 Nick Clifton <nickc@redhat.com>
1471 * elf.c (bfd_section_from_shdr): Issue an informative warning
1472 message and continue processing other sections after encountering
1473 a reloc section for a section which already has other relocs
1476 2019-08-23 Alan Modra <amodra@gmail.com>
1479 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
1480 on error without freeing plts[] contents.
1482 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
1484 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
1486 2019-08-22 Nick Clifton <nickc@redhat.com>
1489 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
1490 reading data from extra records.
1492 2019-08-22 Tamar Christina <tamar.christina@arm.com>
1495 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
1496 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
1497 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
1498 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
1501 2019-08-22 Alan Modra <amodra@gmail.com>
1503 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
1504 instead recognize CMSE_PREFIX in symbol name.
1505 (elf32_arm_gc_mark_extra_sections): Likewise.
1506 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
1507 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
1509 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
1511 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
1512 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
1514 2019-08-20 Tamar Christina <tamar.christina@arm.com>
1516 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
1517 elf32_arm_stub_long_branch_v4t_thumb_thumb,
1518 elf32_arm_stub_long_branch_v4t_thumb_arm,
1519 elf32_arm_stub_short_branch_v4t_thumb_arm,
1520 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
1521 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
1522 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
1523 previous instruction.
1525 2019-08-19 Tom Tromey <tromey@adacore.com>
1527 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
1530 2019-08-19 Alan Modra <amodra@gmail.com>
1532 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
1534 (struct _ppc64_elf_section_data): Likewise.
1535 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
1536 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
1537 than TOC loop. Check PLT16 insns too.
1539 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
1542 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
1543 PC-relative relocations back to ...
1544 (elf_x86_64_relocate_section): Here.
1546 2019-08-16 Martin Liska <mliska@suse.cz>
1549 * elflink.c: Report error only for not relocatable.
1550 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
1551 here lto_slim_object as it's handled in caller.
1553 2019-08-16 Alan Modra <amodra@gmail.com>
1555 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
1557 2019-08-15 Jim Wilson <jimw@sifive.com>
1559 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
1560 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
1561 to c.li instruction, and use ENCODE_RVC_IMM to set value.
1563 2019-08-15 Tom Tromey <tromey@adacore.com>
1565 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
1568 2019-08-14 Alan Modra <amodra@gmail.com>
1571 * dwarf2.c (stash_comp_unit): New function, extracted from..
1572 (_bfd_dwarf2_find_nearest_line): ..here.
1573 (find_abstract_instance): Parse comp units and decode line info
1576 2019-08-14 Alan Modra <amodra@gmail.com>
1578 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
1579 (comp_unit_find_nearest_line): Use it here..
1580 (_bfd_dwarf2_find_symbol_bias): ..and here.
1582 2019-08-14 Alan Modra <amodra@gmail.com>
1584 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
1585 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1586 * coffgen.c (coff_find_nearest_line_with_names): Adjust
1587 _bfd_dwarf2_find_nearest_line calls.
1588 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
1589 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1590 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1591 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
1592 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1593 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1594 * libbfd.h: Regenerate.
1596 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
1598 * elf-bfd.h (struct elf_backend_data): New members.
1599 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
1600 .gnu.hash section if necessary.
1601 (struct collect_gnu_hash_codes): New member.
1602 (elf_gnu_hash_process_symidx): New function name.
1603 (elf_renumber_gnu_hash_syms): Ignore local and undefined
1604 symbols. Record xlat location for every symbol which should have
1605 a .MIPS.xhash entry.
1606 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
1607 dynamic section if necessary.
1608 (GNU_HASH_SECTION_NAME): New define.
1609 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
1610 Update the section size info.
1611 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
1612 (struct mips_elf_link_hash_entry): New member.
1613 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
1615 (mips_elf_sort_hash_table): Initialize the pointer to the
1616 .MIPS.xhash section.
1617 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
1618 translation table entry with the symbol dynindx.
1619 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
1620 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
1622 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
1624 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
1626 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
1627 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
1629 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
1630 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
1631 (_bfd_mips_post_process_headers): Mark the ABI version as
1632 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
1633 but not a .hash section.
1634 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
1635 position in the translation table, associated with the hash
1637 * elfxx-mips.h (literal_reloc_p): Define
1638 elf_backend_record_xhash_symbol backend hook.
1639 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
1642 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1644 * elf64-bpf.c (bpf_elf_relocate_section): New function.
1645 (bpf_elf_insn_disp_reloc): Delete function.
1646 (elf_backend_relocate_section): Define.
1648 2019-08-07 Alan Modra <amodra@gmail.com>
1651 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
1652 for overflow in expressions involving nsymz.
1654 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1656 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1657 two pages in relro presence.
1659 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1661 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1662 (get_wsr_lbeg_opcode): New functions.
1663 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1664 and insn_len for the first actual instruction of the loop.
1666 2019-07-30 Alan Modra <amodra@gmail.com>
1669 * bfd.c (struct bfd): Add lto_slim_object flag.
1670 * bfd-in2.h: Regenerate.
1672 2019-07-29 Martin Liska <mliska@suse.cz>
1675 * archive.c (_bfd_compute_and_write_armap): Come up with
1676 report_plugin_err variable.
1677 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1678 * elf.c (struct lto_section): New.
1679 (_bfd_elf_make_section_from_shdr): Parse content of
1680 .gnu_lto_.lto section.
1681 * elflink.c: Report error for a missing LTO plugin.
1682 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1684 2019-07-28 Alan Modra <amodra@gmail.com>
1688 * elflink.c (elf_link_add_object_symbols): Report an informative
1689 error on finding local symbols with index equal or greater than
1690 symbol table sh_info. Correct comment. Allow such symbols in
1691 dynamic objects. Abort on NULL section for symbol.
1693 2019-07-26 Alan Modra <amodra@gmail.com>
1695 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1696 (elf_linker): Don't define.
1697 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1699 2019-07-25 YunQiang Su <syq@debian.org>
1702 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1705 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1707 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1709 (reloc_type_to_name): Fix formating.
1710 (arc_elf_object_p): Likewise.
1711 (debug_arc_reloc): Likewise.
1712 (arc_do_relocation): Likewise.
1714 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1716 * elf32-arc.c (bfd_get_32_me): New function.
1717 (bfd_put_32_me): Likewise.
1718 (arc_elf_relax_section): Likewise.
1719 (bfd_elf32_bfd_relax_section): Define.
1721 2019-07-24 Alan Modra <amodra@gmail.com>
1723 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1724 elf_backend_final_write_processing, don't pass linker arg.
1725 (_bfd_elf_final_write_processing): Update prototype.
1726 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1727 (_bfd_elf_final_write_processing): Return error on incompatible
1728 OSABI and has_gnu_osabi. Remove linker arg.
1729 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1730 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1731 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1732 (_bfd_mips_elf_final_write_processing): Likewise.
1733 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1734 and remove linker arg.
1735 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1736 * elf-nacl.c (nacl_final_write_processing): Likewise.
1737 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1738 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1739 * elf32-arm.c (arm_final_write_processing): Likewise.
1740 (elf32_arm_final_write_processing): Likewise.
1741 (elf32_arm_nacl_final_write_processing): Likewise.
1742 (elf32_arm_vxworks_final_write_processing): Likewise.
1743 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1744 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1745 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1746 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1747 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1748 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1749 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1750 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1751 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1752 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1753 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1754 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1755 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1756 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1757 (ppc_elf_final_write_processing): Likewise.
1758 (ppc_elf_vxworks_final_write_processing): Likewise.
1759 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1760 (elf32_sparc_final_write_processing): Likewise.
1761 (elf32_sparc_vxworks_final_write_processing): Likewise.
1762 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1763 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1764 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1765 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1766 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1767 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1768 (_bfd_mips_elf_final_write_processing): Likewise.
1770 2019-07-24 Alan Modra <amodra@gmail.com>
1772 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1774 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1775 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1777 2019-07-24 Alan Modra <amodra@gmail.com>
1779 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1780 EI_OSABI header byte here.
1781 (ELF_OSABI): Define.
1783 2019-07-23 Alan Modra <amodra@gmail.com>
1785 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1786 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1787 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1788 when elf_gnu_osabi_mbind is set.
1789 (_bfd_elf_map_sections_to_segments): Likewise.
1790 (_bfd_elf_init_private_section_data): Likewise.
1791 (_bfd_elf_final_write_processing): Update comment.
1792 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1793 (elf_backend_special_sections): Define without .tbss for linux.
1795 2019-07-23 Alan Modra <amodra@gmail.com>
1797 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1798 Remove none, any, all enums.
1799 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1800 (_bfd_elf_final_write_processing): Declare.
1801 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1802 elf_backend_final_write_processing.
1803 (_bfd_elf_post_process_headers): Move body of function to..
1804 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1805 only when not already set. Adjust for rename.
1806 * elfxx-target.h (elf_backend_final_write_processing): Default to
1807 _bfd_elf_final_write_processing.
1808 * elf-hppa.h (elf_hppa_final_write_processing): Call
1809 _bfd_elf_final_write_processing.
1810 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1811 * elf-nacl.c (nacl_final_write_processing): Likewise.
1812 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1813 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1814 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1815 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1816 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1817 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1818 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1819 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1820 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1821 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1822 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1823 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1824 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1825 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1826 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1827 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1828 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1829 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1830 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1831 * elf32-arm.c (arm_final_write_processing): Split out from..
1832 (elf32_arm_final_write_processing): ..here. Call
1833 _bfd_elf_final_write_processing.
1834 (elf32_arm_nacl_final_write_processing): Adjust.
1835 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1836 (_bfd_mips_elf_final_write_processing): ..here. Call
1837 _bfd_elf_final_write_processing.
1838 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1839 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1840 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1841 (ppc_elf_final_write_processing): ..here. Call
1842 _bfd_elf_final_write_processing.
1843 (ppc_elf_vxworks_final_write_processing): Adjust.
1844 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1845 (elf32_sparc_final_write_processing): ..here. Call
1846 _bfd_elf_final_write_processing.
1847 (elf32_sparc_vxworks_final_write_processing): Adjust.
1848 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1849 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1850 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1851 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1852 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1853 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1854 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1855 * elflink.c (elf_link_add_object_symbols): Likewise.
1856 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1859 2019-07-23 Omar Majid <omajid@redhat.com>
1861 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1862 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1863 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1865 * peXXigen.c: Add comment about source of .NET magic numbers.
1867 2019-07-19 Alan Modra <amodra@gmail.com>
1869 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1870 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1871 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1872 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1873 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1874 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1875 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1876 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1877 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1878 * bfd-in2.h: Regenerate.
1879 * libbfd.h: Regenerate.
1881 2019-07-18 Alan Modra <amodra@gmail.com>
1883 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1884 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1887 2019-07-18 Alan Modra <amodra@gmail.com>
1889 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1890 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1891 is more than 8 bits.
1892 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1893 tls_type vars unsigned int.
1894 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1895 to select r_type edit.
1897 2019-07-18 Alan Modra <amodra@gmail.com>
1899 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1901 * elf64-ppc.c (TLS_GDIE): Likewise.
1903 2019-07-18 Alan Modra <amodra@gmail.com>
1905 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1906 range of tp-relative offsets.
1908 2019-07-15 Alan Modra <amodra@gmail.com>
1910 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1911 alias is no longer bfd_link_hash_defined, clear the alias.
1913 2019-07-13 Alan Modra <amodra@gmail.com>
1915 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1917 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1918 (_bfd_elf_init_2_index_sections): Likewise.
1919 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1920 relocations for local TLS symbols, use STN_UNDEF as the relocation
1922 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1923 leave TLS symbol value in the addend.
1925 2019-07-08 Alan Modra <amodra@gmail.com>
1928 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1929 size before reading first word.
1931 2019-07-02 Nick Clifton <nickc@redhat.com>
1934 * elf.c (is_debuginfo_file): New function.
1935 (assign_file_positions_for_non_load_sections): Do not warn about
1936 allocated sections outside of loadable segments if they are found
1937 in a debuginfo file.
1938 * elf-bfd.h (is_debuginfo_file): Prototype.
1940 2019-07-02 Nick Clifton <nickc@redhat.com>
1943 * compress.c (bfd_get_full_section_contents): Do not complain
1944 about linker created sections that are larger than the file size.
1946 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1948 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1949 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1951 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1953 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1955 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1956 sections when .text section contain secure entry functions
1959 2019-07-01 Nick Clifton <nickc@redhat.com>
1962 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1963 section VMA in the offset used to update exidx relocs.
1965 2019-06-28 Nick Clifton <nickc@redhat.com>
1968 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1969 large version reference section.
1970 * compress.c (bfd_get_full_section_contents): Check for an
1971 uncompressed section whose size is larger than the file size.
1973 2019-06-28 Alan Modra <amodra@gmail.com>
1975 * format.c (bfd_check_format_matches): Don't match plugin target
1976 if another target matches. Expand comment.
1977 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1978 non-corefile targets, outside !SELECT_VECS.
1979 * config.bfd: Don't handle targ=plugin here.
1980 * configure.ac: Don't add plugin to enable_targets or handle in
1981 target loop setting selvecs and other target vars.
1982 * configure: Regenerate.
1984 2019-06-26 Nick Clifton <nickc@redhat.com>
1987 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1988 messages for failures.
1989 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1990 if returning an error value.
1992 2019-06-25 Jan Beulich <jbeulich@suse.com>
1994 * elf-properties.c (elf_find_and_remove_property): Rename last
1995 parameter. Mention it in comment.
1997 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1999 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
2000 SEC_MERGE or SEC_CODE flags are set.
2001 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
2002 symtype consistently. Don't include sec_addr (sym_sec) in symval.
2003 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
2004 Add sec_addr (sym_sec) after handling merge sections.
2006 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf-properties.c (elf_merge_gnu_property_list): Remove the
2010 property after reporting property removal.
2012 2019-06-23 Alan Modra <amodra@gmail.com>
2015 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
2016 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
2017 Reduce range of offsets allowed for other GOT relocs.
2019 2019-06-23 Alan Modra <amodra@gmail.com>
2022 * elfcode.h (elf_object_p): Warning fix.
2024 2019-06-21 Alan Modra <amodra@gmail.com>
2027 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
2029 2019-06-19 Alan Modra <amodra@gmail.com>
2032 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
2033 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
2035 2019-06-19 Alan Modra <amodra@gmail.com>
2037 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
2038 functions that require r2 valid to use local entry.
2039 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
2041 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2043 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
2044 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
2045 with elfNN_aarch64_allocate_local_dynrelocs.
2047 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
2049 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
2051 2019-06-14 Alan Modra <amodra@gmail.com>
2053 * Makefile.in: Regenerate.
2054 * configure: Regenerate.
2056 2019-06-14 Alan Modra <amodra@gmail.com>
2058 * elf64-ppc.c: Fix comments involving paddi.
2060 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
2063 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
2064 absent, or the bfd is not in the ELF formart.
2065 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
2067 2019-06-10 Christos Zoulas <christos@zoulas.com>
2070 * elf.c (elfcore_make_auxv_note_section): New function.
2071 (elfcore_grok_note): Use it.
2072 (elfcore_grok_freebsd_note): Likewise.
2073 (elfcore_grok_openbsd_note): Likewise.
2074 (elfcore_grok_netbsd_note): Likewise. Plus add support for
2075 NT_NETBSDCORE_AUXV notes.
2077 2019-06-06 Sudakshina Das <sudi.das@arm.com>
2079 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
2080 alignment of the new gnu property section.
2082 2019-06-06 Sudakshina Das <sudi.das@arm.com>
2084 * bfd-in.h: Change comment.
2085 * bfd-in2.h: Regenerate.
2086 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
2087 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
2090 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
2092 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
2093 Remove overflow check.
2095 2019-05-28 Alan Modra <amodra@gmail.com>
2098 * cofflink.c (coff_link_check_archive_element): Don't assume
2099 element is a coff object file after calling add_archive_element.
2101 2019-05-28 Alan Modra <amodra@gmail.com>
2104 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
2105 attempt to set sh_entsize for excluded PLT section.
2107 2019-05-28 Alan Modra <amodra@gmail.com>
2110 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
2111 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
2112 allocated in alpha_dynamic_entries_for_reloc.
2114 2019-05-28 Alan Modra <amodra@gmail.com>
2117 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
2118 on NULL output_section.
2119 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
2121 2019-05-28 Alan Modra <amodra@gmail.com>
2124 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
2125 entry when MUST_FIND. Abort when MUST_FIND not found.
2126 (elf_m68k_get_bfd2got_entry): Likewise.
2127 (elf_m68k_relocate_section): Remove now useless assert.
2129 2019-05-28 Alan Modra <amodra@gmail.com>
2132 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
2133 from bfd_link_info, not an output section owner.
2134 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
2135 (elf_hppa_final_link_relocate): Likewise.
2137 2019-05-28 Alan Modra <amodra@gmail.com>
2140 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
2141 create_object_symbols_section, obj_textsec, obj_datasec or
2142 obj_bsssec. Fix other errors in placement.
2143 * config.bfd: Obsolete tic30-aout.
2145 2019-05-28 Alan Modra <amodra@gmail.com>
2148 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
2149 end of section list as well as section_count.
2150 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
2151 section list before returning error.
2153 2019-05-27 Alan Modra <amodra@gmail.com>
2155 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
2157 2019-05-27 Alan Modra <amodra@gmail.com>
2160 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
2162 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
2164 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
2165 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
2166 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
2167 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
2168 (elf_backend_merge_symbol_attribute): Define.
2170 2019-05-24 Alan Modra <amodra@gmail.com>
2172 * po/SRC-POTFILES.in: Regenerate.
2174 2019-05-24 Alan Modra <amodra@gmail.com>
2176 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
2177 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
2178 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
2179 (struct ppc_link_hash_table): Add powerxx_stubs.
2180 (ppc64_elf_check_relocs): Set powerxx_stubs.
2181 (build_powerxx_offset, size_powerxx_offset),
2182 (num_relocs_for_powerxx_offset),
2183 (emit_relocs_for_powerxx_offset): New functions.
2184 (plt_stub_size): Size powerxx stubs.
2185 (ppc_build_one_stub): Emit powerxx stubs.
2186 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
2189 2019-05-24 Alan Modra <amodra@gmail.com>
2191 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
2192 R_PPC64_GOT_PCREL34.
2193 (xlate_pcrel_opt): New function.
2194 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
2195 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2196 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
2198 2019-05-24 Alan Modra <amodra@gmail.com>
2200 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
2201 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
2202 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
2203 (BFD_RELOC_PPC64_PLT_PCREL34),
2204 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
2205 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
2206 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
2207 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
2208 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
2209 * elf64-ppc.c (PNOP): Define.
2210 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
2211 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
2212 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
2214 (ppc64_elf_prefix_reloc): New function.
2215 (struct ppc_link_hash_table): Add notoc_plt.
2216 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
2217 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
2218 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
2219 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
2220 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
2221 possible need for dynamic relocs on non-pcrel powerxx relocs.
2222 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
2223 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
2224 (toc_adjusting_stub_needed): Likewise.
2225 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
2226 (ppc64_elf_relocate_section): Handle new powerxx relocs.
2227 * bfd-in2.h: Regenerate.
2228 * libbfd.h: Regenerate.
2230 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
2232 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
2233 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
2235 * configure: Regenerate.
2237 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
2239 * configure: Regenerated.
2240 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
2241 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
2242 (BFD64_BACKENDS): Add elf64-bpf.lo.
2243 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
2244 * Makefile.in (SOURCE_HFILES): Regenerate.
2245 * config.bfd (targ_cpu): Handle bpf-*-* targets.
2246 * cpu-bpf.c: New file.
2247 * elf64-bpf.c: Likewise.
2248 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
2250 * archures.c: Define architecture bfd_arch_bpf and machine
2252 * reloc.c: Define BFD relocations used by the BPF target.
2253 * bfd-in2.h: Regenerated.
2254 * libbfd.h: Likewise.
2256 2019-05-22 Alan Modra <amodra@gmail.com>
2258 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
2261 2019-05-22 Alan Modra <amodra@gmail.com>
2263 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
2264 processing on "size error in section".
2266 2019-05-22 Alan Modra <amodra@gmail.com>
2268 * som.c (som_bfd_free_cached_info): Call
2269 _bfd_generic_close_and_cleanup.
2271 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2273 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
2274 for TLS_TPREL_HI16(/LO16) relocations in shared library.
2276 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2278 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
2279 checks. Search the RELA table for n64 relocations.
2281 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
2282 Faraz Shahbazker <fshahbazker@wavecomp.com>
2284 * elfxx-mips.c (LA25_BC): New macro.
2285 (mips_elf_link_hash_table)<compact_branches>: New field.
2286 (STUB_JALRC): New macro.
2287 (mipsr6_o32_exec_plt0_entry_compact): New array.
2288 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
2289 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
2290 (mipsr6_exec_plt_entry_compact): Likewise.
2291 (mips_elf_create_la25_stub): Use BC instead of J for stubs
2292 when compact_branches is true.
2293 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
2294 PLT for MIPSR6 with compact_branches. Do not reorder the
2295 compact branches PLT. Switch the lazy stub for MIPSR6
2296 with compact_branches to use JALRC.
2297 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
2298 when compact_branches is true.
2299 (_bfd_mips_elf_compact_branches): New function.
2300 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
2302 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2305 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
2306 Fix print formatter.
2308 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2311 * elf32-arm.c (get_value_helper): Remove.
2312 (elf32_arm_final_link_relocate): Fix branch future relocations.
2314 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2317 * bfd-in.h (enum erratum_84319_opts): New
2318 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
2319 int to enum erratum_84319_opts.
2320 * bfd-in2.h: Regenerate.
2321 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
2322 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
2323 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
2324 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
2325 (_bfd_aarch64_resize_stubs): Amend comment.
2326 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
2328 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
2329 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
2331 (clear_erratum_843419_entry): Update erratum conditional.
2333 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2336 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
2337 when computing distance_short_enough.
2339 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2342 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
2343 Wrap around even if distance equals avr_pc_wrap_around.
2345 2019-05-20 Nick Clifton <nickc@redhat.com>
2347 * po/fr.po: Updated French translation.
2349 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
2351 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
2353 2019-05-16 Alan Modra <amodra@gmail.com>
2355 * elf32-arm.c (elf32_arm_write_section): Revert last change.
2357 2019-05-15 Alan Modra <amodra@gmail.com>
2359 * elf32-arm.c (elf32_arm_write_section): Don't leave
2360 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
2361 unitialised section contents.
2363 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
2366 * verilog.c: (VerilogDataWidth): New variable.
2367 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
2369 2019-05-08 Nick Clifton <nickc@redhat.com>
2372 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
2373 rather than FALSE if encountering a non-ELF file.
2375 2019-05-06 Alan Modra <amodra@gmail.com>
2377 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
2379 2019-05-06 Alan Modra <amodra@gmail.com>
2381 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
2382 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
2383 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
2384 * libbfd.h: Regenerate.
2385 * bfd-in2.h: Regenerate.
2387 2019-05-04 Alan Modra <amodra@gmail.com>
2390 * syms.c (coff_section_type): Only allow '.', '$' and numeric
2391 following the standard section names.
2392 (bfd_decode_symclass): Prioritize section flag tests in
2393 decode_section_type before name tests in coff_section_type.
2394 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
2395 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
2396 their names and choose standard .text section flags for
2399 2019-05-02 Nick Clifton <nickc@redhat.com>
2402 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
2403 .gnu.debugaltlink sections as debugging sections.
2405 2019-04-30 Alan Modra <amodra@gmail.com>
2407 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
2408 (struct _ppc64_elf_section_data): Likewise.
2409 (ppc64_elf_check_relocs): Set above fields.
2410 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
2411 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2414 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2417 * elflink.c (elf_link_output_extsym): Don't complain undefined
2418 weak dynamic reference.
2420 2019-04-25 Sudakshina Das <sudi.das@arm.com>
2422 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
2423 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
2424 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
2425 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
2426 (elfNN_aarch64_small_plt0_pac_entry): Remove.
2427 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
2428 (elfNN_aarch64_small_plt0_bti_entry): Update.
2429 (elfNN_aarch64_small_plt_bti_entry): Update.
2430 (elfNN_aarch64_small_plt_pac_entry): Update.
2431 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
2432 (setup_plt_values): Setup new entries.
2433 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
2434 (elfNN_aarch64_plt_sym_val): Likewise.
2436 2019-04-22 Jim Wilson <jimw@sifive.com>
2438 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
2440 2019-04-19 Alan Modra <amodra@gmail.com>
2442 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
2444 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2446 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
2447 building shared object.
2448 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
2450 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2453 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
2456 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2458 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
2460 * bfd-in2.h: Regenerate.
2461 * libbfd.h: Likewise.
2463 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2465 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
2466 * bfd-in2.h: Regenerated.
2467 * libbfd.h: Regenerated.
2469 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2471 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
2472 * bfd-in2.h: Regenerated.
2473 * libbfd.h: Likewise.
2475 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2477 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
2478 * bfd-in2.h: Regenerated.
2479 * libbfd.h: Regenerated.
2480 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
2481 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
2482 and R_ARM_THM_BF12 together.
2483 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
2485 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2487 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
2488 * libbfd.h: Regenerated.
2489 * bfd-in2.h: Regenerated.
2490 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
2491 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
2492 and R_ARM_THM_BF18 together.
2493 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
2495 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2497 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
2498 * bfd-in2.h: Regenerated.
2499 * libbfd.h: Regenerated.
2500 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
2501 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
2502 and R_ARM_THM_BF16 together.
2503 (get_value_helper): New reloc helper.
2504 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
2506 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2508 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
2509 * bfd-in2.h: Regenerate.
2510 * libbfd.h: Regenerate.
2512 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2514 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
2515 * bfd-in2.h: Regenerate.
2516 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
2517 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
2519 (using_thumb2): Likewise.
2520 (using_thumb2_bl): Update assert.
2521 (arch_has_arm_nop): Likewise.
2522 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
2523 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
2525 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2527 * elf-linker-x86.h (elf_x86_cet_report): New.
2528 (elf_linker_x86_params): Add cet_report.
2529 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2530 missing IBT and SHSTK properties if needed.
2532 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2535 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
2536 "h != NULL". Don't check "h != NULL" before calling.
2537 bfd_elf_gc_record_vtentry.
2538 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2539 * elf32-bfin.c (bfin_check_relocs): Likewise.
2540 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2541 * elf32-csky.c (csky_elf_check_relocs): Likewise.
2542 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
2543 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
2544 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
2545 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
2546 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
2547 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2548 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2549 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
2550 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2551 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2552 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
2553 * elf32-metag.c (elf_metag_check_relocs): Likewise.
2554 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
2555 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
2556 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2557 * elf32-sh.c (sh_elf_check_relocs): Likewise.
2558 * elf32-v850.c (v850_elf_check_relocs): Likewise.
2559 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2560 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2561 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2562 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
2563 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2564 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2565 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
2566 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2567 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2568 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
2571 2019-04-11 Alan Modra <amodra@gmail.com>
2574 * elflink.c (elf_link_add_object_symbols): Don't read partial
2575 dynamic entries from fuzzed objects.
2577 2019-04-11 Tamar Christina <tamar.christina@arm.com>
2580 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
2581 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
2582 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
2584 2019-04-10 Michael Forney <mforney@mforney.org>
2587 * doc/chew.c (free_words): Correctly free "push_text" strings.
2589 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
2591 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
2593 2019-04-08 Alan Modra <amodra@gmail.com>
2595 * configure.ac (elfxx_x86): Define and use.
2596 * configure: Regenerate.
2598 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
2600 * elf-linker-x86.h: New file.
2601 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
2602 to get x86-specific linker options.
2603 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2604 (elf_x86_64_check_relocs): Likewise.
2605 (elf_x86_64_relocate_section): Likewise.
2606 (elf_x86_64_link_setup_gnu_properties): Likewise.
2607 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
2608 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2609 (_bfd_elf_linker_x86_set_options): New function.
2610 * elfxx-x86.h: Include "elf-linker-x86.h".
2611 (elf_x86_link_hash_table): Add params.
2613 2019-04-03 Alan Modra <amodra@gmail.com>
2615 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
2616 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
2617 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
2618 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
2619 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
2620 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
2622 2019-04-02 Jim Wilson <jimw@sifive.com>
2625 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
2626 ELF header flags to after check for ELF object file. Loop through
2627 sections looking for code sections, if none, then skip ABI checks.
2629 2019-03-30 Andrew Waterman <andrew@sifive.com>
2631 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
2634 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
2636 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
2637 info->export_dynamic to the conditional.
2639 2019-03-28 Alan Modra <amodra@gmail.com>
2642 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
2643 * configure: Regenerate.
2644 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
2645 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
2646 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
2647 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
2648 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2650 2019-03-21 Jim Wilson <jimw@sifive.com>
2653 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
2654 verify sym non-NULL before using. Add identical check using h.
2656 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2658 * elf-bfd.h (struct elf_backend_data): Add argument to
2659 merge_gnu_properties.
2660 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2661 itself and while calling bed->merge_gnu_properties.
2662 (elf_merge_gnu_property_list): Update the calls for
2663 elf_merge_gnu_properties.
2664 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2665 of --force-bti warning and add argument.
2666 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2668 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2669 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2672 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2674 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2675 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2676 (elf_backend_fixup_gnu_properties): Define for AArch64.
2678 2019-03-18 Alan Modra <amodra@gmail.com>
2681 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2682 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2683 attempt at writing glink stubs only once.
2685 2019-03-16 Alan Modra <amodra@gmail.com>
2688 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2689 (_bfd_elf_rel_local_sym): Likewise.
2690 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2691 section of symbols with unrecognized shndx.
2693 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2696 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2698 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2699 in discarded section.
2701 2019-03-15 Alan Modra <amodra@gmail.com>
2704 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2705 symbol after globals if elf_bad_symtab is not set.
2707 2019-03-15 Alan Modra <amodra@gmail.com>
2710 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2711 (_bfd_elf_rel_local_sym): Likewise.
2713 2019-03-15 Alan Modra <amodra@gmail.com>
2716 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2717 object files with sh_size not a multiple of sh_entsize.
2719 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2722 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2723 input with bad relocation.
2725 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2727 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2729 2019-03-14 Nick Clifton <nickc@redhat.com>
2732 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2733 (save_section_vma): Initialise field to the number of entries in
2735 (section_vma_same): Check that the number of entries in the
2736 sec_vma table matches the number of sections in the bfd.
2738 2019-03-14 Nick Clifton <nickc@redhat.com>
2741 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2742 section owner pointer when adding the default symbol.
2744 2019-03-14 Nick Clifton <nickc@redhat.com>
2747 * elflink.c (elf_link_add_object_symbols): Add new local variable
2748 extversym_end. Initialise it to point to the end of the version
2749 symbol table, if present. Check it when initialising and updating
2752 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2754 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2755 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2756 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2757 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2759 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2760 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2761 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2763 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2764 Szabolcs Nagy <szabolcs.nagy@arm.com>
2766 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2767 (aarch64_bti_pac_info): New.
2768 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2769 (bfd_elf32_aarch64_set_options): Likewise.
2770 * bfd-in2.h: Regenerate
2771 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2772 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2773 (elfNN_aarch64_small_plt0_bti_entry): New.
2774 (elfNN_aarch64_small_plt_bti_entry): New.
2775 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2776 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2777 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2778 tlsdesc_plt_entry_size fields.
2779 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2780 (setup_plt_values): New helper function.
2781 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2783 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2785 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2786 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2787 to plt stubs instead of fixed ones and update filling them according
2788 to the need for bti.
2789 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2790 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2791 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2792 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2793 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2795 (bfd_elfNN_get_synthetic_symtab): Define.
2796 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2797 and mising BTI NOTE SECTION.
2800 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2802 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2803 linker created inputs from merge.
2804 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2805 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2806 (elfNN_aarch64_link_setup_gnu_properties): New.
2807 (elfNN_aarch64_merge_gnu_properties): New.
2808 (elf_backend_setup_gnu_properties): Define for AArch64.
2809 (elf_backend_merge_gnu_properties): Likewise.
2810 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2811 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2812 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2813 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2814 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2815 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2816 (elf_backend_parse_gnu_properties): Define for AArch64.
2818 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2821 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2822 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2824 2019-03-12 Alan Modra <amodra@gmail.com>
2826 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2827 nmemb parameter. Use bfd_alloc2.
2828 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2830 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2831 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2832 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2834 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2835 (assign_section_numbers): Style fix.
2836 (swap_out_syms): Use bfd_malloc2.
2837 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2839 (_bfd_elf_make_empty_symbol): Style fix.
2840 (elfobj_grok_stapsdt_note_1): Formatting.
2841 * elfcode.h (elf_object_p): Use bfd_alloc2.
2842 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2843 (elf_slurp_symbol_table): Use bfd_zalloc2.
2844 (elf_slurp_reloc_table): Use bfd_alloc2.
2845 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2846 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2847 size calculation doesn't overflow.
2848 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2849 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2850 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2852 2019-03-08 Alan Modra <amodra@gmail.com>
2855 * merge.c (merge_strings): Return secinfo. Don't pad section
2857 (_bfd_merge_sections): Pad section to alignment here, if input
2858 sections contributing to merged output all pad to alignment.
2861 2019-03-06 Nick Clifton <nickc@redhat.com>
2863 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2865 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2866 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2868 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2870 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2871 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2874 * elf32-s390.c (allocate_dynrelocs): Update comment.
2876 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2878 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2880 2019-02-28 Nick Clifton <nickc@redhat.com>
2883 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2884 section that is not NUL terminated.
2886 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2889 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2890 by linker when checking copy reloc on protected symbol.
2892 2019-02-24 Alan Modra <amodra@gmail.com>
2895 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2897 2019-02-20 Eric Tsai <erictsai@cadence.com>
2899 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2900 sections between the call site and call destination and adjust
2901 call distance by the largest alignment.
2903 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2905 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2906 * elf.c (elfcore_grok_aarch_pauth): New function.
2907 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2908 (elfcore_write_aarch_pauth): New function.
2909 (elfcore_write_register_note): Check for AArch64 pauth section.
2911 2019-02-20 Alan Modra <amodra@gmail.com>
2914 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2917 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2919 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2920 Darwin hosts, not just or1k.
2921 * configure: Regenerate.
2923 2019-02-20 Alan Modra <amodra@gmail.com>
2926 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2927 sentinel NUL to string buffer nearer to loop where it is used.
2928 Don't go past sentinel when scanning strings, and don't write
2930 * archive.c (do_slurp_coff_armap): Simplify string handling to
2933 2019-02-19 Alan Modra <amodra@gmail.com>
2936 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2937 attempting to prevent read past end of section.
2939 2019-02-18 Alan Modra <amodra@gmail.com>
2942 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2943 PRIx64 to generate warning messages. Print local sym names too.
2945 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2947 * elf32-arc (INIT_SYM_STRING): Delete.
2948 (FINI_SYM_STRING): Likewise.
2949 (init_str): Likewise.
2950 (fini_str): Likewise.
2952 2019-02-08 Alan Modra <amodra@gmail.com>
2954 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2955 for bss-plt" warning to make it an error.
2957 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2960 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2961 reloc_class_ifunc for ifunc symbols.
2962 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2964 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2966 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2967 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2969 2019-02-07 Nick Clifton <nickc@redhat.com>
2971 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2972 into the definitely obsolete list.
2974 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2977 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2978 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2979 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2981 (elf_x86_64_check_relocs): Here.
2982 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2983 to check if a symbol is defined in a non-shared object.
2984 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2986 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2988 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2989 of 'labs' (and fix GCC warning).
2991 2019-01-25 Nick Clifton <nickc@redhat.com>
2993 * po/ru.po: Updated Russian translation.
2995 2019-01-23 Nick Clifton <nickc@redhat.com>
2997 * po/fr.po: Updated French translation.
2999 2019-01-21 Nick Clifton <nickc@redhat.com>
3001 * po/pt.po: Updated Portuguese translation.
3002 * po/uk.po: Updated Ukranian translation.
3004 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
3007 * elf32-nds32.c (nds32_relocate_section): Add space between words
3009 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
3011 (riscv_i_or_e_p): Likewise.
3012 (riscv_merge_arch_attr_info): Likewise.
3014 2019-01-19 Nick Clifton <nickc@redhat.com>
3016 * version.m4: Reset to 2.32.51
3017 * configure: Regenerate.
3018 * po/bfd.pot: Regenerate.
3020 2018-06-24 Nick Clifton <nickc@redhat.com>
3022 2.32 branch created.
3024 2019-01-16 Kito Cheng <kito@andestech.com>
3026 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
3029 2019-01-16 Kito Cheng <kito@andestech.com>
3030 Nelson Chu <nelson@andestech.com>
3032 * elfnn-riscv.c (in_subsets): New.
3033 (out_subsets): Likewise.
3034 (merged_subsets): Likewise.
3035 (riscv_std_ext_p): Likewise.
3036 (riscv_non_std_ext_p): Likewise.
3037 (riscv_std_sv_ext_p): Likewise.
3038 (riscv_non_std_sv_ext_p): Likewise.
3039 (riscv_version_mismatch): Likewise.
3040 (riscv_i_or_e_p): Likewise.
3041 (riscv_merge_std_ext): Likewise.
3042 (riscv_merge_non_std_and_sv_ext): Likewise.
3043 (riscv_merge_arch_attr_info): Likewise.
3044 (riscv_merge_attributes): Likewise.
3045 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
3047 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
3048 (elf_backend_obj_attrs_vendor): Define.
3049 (elf_backend_obj_attrs_section_type): Likewise.
3050 (elf_backend_obj_attrs_section): Likewise.
3051 (elf_backend_obj_attrs_arg_type): Define as
3052 riscv_elf_obj_attrs_arg_type.
3053 * elfxx-riscv.c (riscv_estimate_digit): New.
3054 (riscv_estimate_arch_strlen1): Likewise.
3055 (riscv_estimate_arch_strlen): Likewise.
3056 (riscv_arch_str1): Likewise.
3057 (riscv_arch_str): Likewise.
3058 * elfxx-riscv.h (riscv_arch_str): Declare.
3060 2019-01-14 John Darrington <john@darrington.wattle.id.au>
3062 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
3064 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
3065 source field. (md_apply_fix): Apply final fix
3066 to BFD_RELOC_S12Z_OPR.
3067 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
3069 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
3072 * elf32-s390.c (allocate_dynrelocs): Update comment.
3074 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
3076 * warning.m4: Adjust egrep pattern for non-GNU compilers.
3077 * configure: Regenerate.
3079 2019-01-08 Alan Modra <amodra@gmail.com>
3083 * ihex.c (ihex_write_object_contents): Properly check 32-bit
3086 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
3088 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
3089 * bfd/bfd-in2.h: Regenerate.
3090 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
3091 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
3093 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
3095 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
3096 default target, little endian target is more suitable.
3098 2019-01-04 Alan Modra <amodra@gmail.com>
3102 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
3104 (EQ_VALUE_IN_FIELD): Likewise.
3105 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
3107 2019-01-01 Alan Modra <amodra@gmail.com>
3109 Update year range in copyright notice of all files.
3111 For older changes see ChangeLog-2018
3113 Copyright (C) 2019 Free Software Foundation, Inc.
3115 Copying and distribution of this file, with or without modification,
3116 are permitted in any medium without royalty provided the copyright
3117 notice and this notice are preserved.
3123 version-control: never