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