| 1 | 2020-06-05 Nick Clifton <nickc@redhat.com> |
| 2 | |
| 3 | * pdp11.c (aout_link_add_symbols): Fix use before initialisation |
| 4 | bug. |
| 5 | |
| 6 | 2020-06-05 Nelson Chu <nelson.chu@sifive.com> |
| 7 | |
| 8 | * elfnn-riscv.c (riscv_merge_attributes): Add new boolean |
| 9 | priv_may_conflict, in_priv_zero and out_priv_zero to decide |
| 10 | whether the object can be linked according to it's priv |
| 11 | attributes. The object without any priv spec attributes can |
| 12 | be linked with others. If the first input object doesn't contain |
| 13 | any priv attributes, then we need to copy the setting from the |
| 14 | next input one. Also report more detailed error messages to user. |
| 15 | |
| 16 | 2020-06-04 Stephen Casner <casner@acm.org> |
| 17 | |
| 18 | Extend pdp11-aout symbol table format to accommodate .stab |
| 19 | symbols and implement correct handling of them. |
| 20 | |
| 21 | * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc. |
| 22 | (N_STAB, is_stab): Needed new function is_stab to disambiguate |
| 23 | normal vs. .stab symbol table type values, replacing N_STAB mask. |
| 24 | (translate_from_native_sym_flags): Determine correct section for |
| 25 | different .stab types. |
| 26 | (translate_to_native_sym_flags): Leave .stab types intact. |
| 27 | (translate_symbol_table): Error if symbol indicates overlay; |
| 28 | store desc field from .stab symbols. |
| 29 | (write_syms): Output desc field with symbol. |
| 30 | (aout_link_check_ar_symbols): Skip .stab symbols. |
| 31 | (aout_link_add_symbols): Correctly distinguish .stab symbols. |
| 32 | (aout_link_write_other_symbol): Write 0 for desk and ovly fields. |
| 33 | (aout_link_write_symbols): Write 0 for desk and ovly fields; |
| 34 | correctly distinguish .stab symbols and select calculate their |
| 35 | section and value; and copy desc and ovly fields from input symbol |
| 36 | to output symbol. |
| 37 | |
| 38 | 2020-06-04 Stephen Casner <casner@acm.org> |
| 39 | |
| 40 | * aoutx.h (translate_symbol_table): Comment had external and |
| 41 | internal swapped. |
| 42 | * pdp11.c (translate_symbol_table): Likewise. |
| 43 | |
| 44 | 2020-06-04 H.J. Lu <hongjiu.lu@intel.com> |
| 45 | |
| 46 | * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id. |
| 47 | (is_x86_elf): Check elf.hash_table_id instead of target_id. |
| 48 | * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated. |
| 49 | |
| 50 | 2020-06-04 H.J. Lu <hongjiu.lu@intel.com> |
| 51 | |
| 52 | PR ld/26080 |
| 53 | * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation |
| 54 | in debug section against symbol defined in shared library to 0. |
| 55 | * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check. |
| 56 | * elf32-lm32.c (lm32_elf_check_relocs): Likewise. |
| 57 | * elf32-m32r.c (m32r_elf_check_relocs): Likewise. |
| 58 | * elf32-nds32.c (nds32_elf_check_relocs): Likewise. |
| 59 | * elf32-nios2.c (nios2_elf32_check_relocs): Likewise. |
| 60 | * elf32-or1k.c (or1k_elf_check_relocs): Likewise. |
| 61 | * elf32-ppc.c (ppc_elf_check_relocs): Likewise. |
| 62 | * elf32-sh.c (sh_elf_check_relocs): Likewise. |
| 63 | * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. |
| 64 | * elf64-alpha.c (elf64_alpha_check_relocs): Likewise. |
| 65 | * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. |
| 66 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. |
| 67 | * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. |
| 68 | * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT |
| 69 | reference. |
| 70 | (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if |
| 71 | there is non-GOT reference. |
| 72 | * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded, |
| 73 | non-alloced sections. |
| 74 | |
| 75 | 2020-06-03 Stephen Casner <casner@acm.org> |
| 76 | |
| 77 | Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c. |
| 78 | |
| 79 | * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for |
| 80 | files with relocs. |
| 81 | (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero. |
| 82 | 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any |
| 83 | other size that doesn't qcover the header word. |
| 84 | bf82069dce1 PR 23056 - Allocate an extra byte at the end of the |
| 85 | string table, and zero it. |
| 86 | (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error |
| 87 | message and set bfd_error on finding an invalid name string offset. |
| 88 | (add_to_stringtab): INLINE -> inline |
| 89 | (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index |
| 90 | bound check. |
| 91 | (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report |
| 92 | any relocs that could not be recognised. |
| 93 | 92744f05809 PR 20929 - Check for relocs without an associated symbol. |
| 94 | (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol |
| 95 | name exists and is long enough, before attempting to see if it is |
| 96 | for a .o file. |
| 97 | c3864421222 - Correct case for N_SO being the last symbol. |
| 98 | 50455f1ab29 PR 20891 - Handle the case where the main file name |
| 99 | and the directory name are both empty. |
| 100 | e82ab856bb4 PR 20892 - Handle the case where function name is empty. |
| 101 | (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of |
| 102 | range string table offsets. |
| 103 | 531336e3a0b PR 20909 - Fix off-by-one error in check for an |
| 104 | illegal string offset. |
| 105 | (aout_link_includes_newfunc): Add comment. |
| 106 | (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error |
| 107 | on unexpected relocation type rather than ASSERT. |
| 108 | |
| 109 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 110 | |
| 111 | PR ld/26066 |
| 112 | * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call |
| 113 | _bfd_elf_maybe_set_textrel to set DF_TEXTREL. |
| 114 | |
| 115 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 116 | |
| 117 | PR ld/26066 |
| 118 | * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded, |
| 119 | non-alloced sections. |
| 120 | |
| 121 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 122 | |
| 123 | * elf32-frv.c (elf32_frv_relocate_section): Don't generate |
| 124 | dynamic relocations for non SEC_ALLOC sections. |
| 125 | |
| 126 | 2020-06-03 Gunther Nikl <gnikl@justmail.de> |
| 127 | |
| 128 | * aout64.c (BMAGIC, QMAGIC): Do not define. |
| 129 | * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines. |
| 130 | (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC |
| 131 | to check the file format. |
| 132 | (adjust_z_magic): Use N_SET_QMAGIC to set file format. |
| 133 | * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define. |
| 134 | * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define. |
| 135 | |
| 136 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 137 | |
| 138 | * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic |
| 139 | relocations for non SEC_ALLOC sections. |
| 140 | |
| 141 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 142 | |
| 143 | * elf-bfd.h (_bfd_elf_maybe_set_textrel): New |
| 144 | * elf32-arm.c (maybe_set_textrel): Removed. |
| 145 | (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel |
| 146 | with _bfd_elf_maybe_set_textrel. |
| 147 | * elf32-csky.c (maybe_set_textrel): Removed. |
| 148 | (csky_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 149 | with _bfd_elf_maybe_set_textrel. |
| 150 | * elf32-hppa.c (maybe_set_textrel): Removed. |
| 151 | (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel |
| 152 | with _bfd_elf_maybe_set_textrel. |
| 153 | * elf32-lm32.c (maybe_set_textrel): Removed. |
| 154 | (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 155 | with _bfd_elf_maybe_set_textrel. |
| 156 | * elf32-m32r.c (maybe_set_textrel): Removed. |
| 157 | (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 158 | with _bfd_elf_maybe_set_textrel. |
| 159 | * elf32-metag.c (maybe_set_textrel): Removed. |
| 160 | (elf_metag_size_dynamic_sections): Replace maybe_set_textrel |
| 161 | with _bfd_elf_maybe_set_textrel. |
| 162 | * elf32-nds32.c (maybe_set_textrel): Removed. |
| 163 | (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 164 | with _bfd_elf_maybe_set_textrel. |
| 165 | * elf32-or1k.c (maybe_set_textrel): Removed. |
| 166 | (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 167 | with _bfd_elf_maybe_set_textrel. |
| 168 | * elf32-ppc.c (maybe_set_textrel): Removed. |
| 169 | (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 170 | with _bfd_elf_maybe_set_textrel. |
| 171 | * elf32-s390.c (maybe_set_textrel): Removed. |
| 172 | (elf_s390_size_dynamic_sections): Replace maybe_set_textrel |
| 173 | with _bfd_elf_maybe_set_textrel. |
| 174 | * elf32-sh.c (maybe_set_textrel): Removed. |
| 175 | (sh_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 176 | with _bfd_elf_maybe_set_textrel. |
| 177 | * elf32-tic6x.c (maybe_set_textrel): Removed. |
| 178 | (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel |
| 179 | with _bfd_elf_maybe_set_textrel. |
| 180 | * elf32-tilepro.c (maybe_set_textrel): Removed. |
| 181 | (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 182 | with _bfd_elf_maybe_set_textrel. |
| 183 | * elf64-ppc.c (maybe_set_textrel): Removed. |
| 184 | (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 185 | with _bfd_elf_maybe_set_textrel. |
| 186 | * elf64-s390.c (maybe_set_textrel): Removed. |
| 187 | (elf_s390_size_dynamic_sections): Replace maybe_set_textrel |
| 188 | with _bfd_elf_maybe_set_textrel. |
| 189 | * elfnn-aarch64.c (maybe_set_textrel): Removed. |
| 190 | (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel |
| 191 | with _bfd_elf_maybe_set_textrel. |
| 192 | * elfnn-riscv.c (maybe_set_textrel): Removed. |
| 193 | (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 194 | with _bfd_elf_maybe_set_textrel. |
| 195 | * elfxx-sparc.c (maybe_set_textrel): Removed. |
| 196 | (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 197 | with _bfd_elf_maybe_set_textrel. |
| 198 | * elfxx-tilegx.c (maybe_set_textrel): Removed. |
| 199 | (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 200 | with _bfd_elf_maybe_set_textrel. |
| 201 | * elfxx-x86.c (maybe_set_textrel): Removed. |
| 202 | (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel |
| 203 | with _bfd_elf_maybe_set_textrel. |
| 204 | * elflink.c (_bfd_elf_maybe_set_textrel): New. |
| 205 | |
| 206 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 207 | |
| 208 | PR ld/26067 |
| 209 | * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy |
| 210 | dyn_relocs. |
| 211 | * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise. |
| 212 | * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. |
| 213 | * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise. |
| 214 | * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol): |
| 215 | Likewise. |
| 216 | * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise. |
| 217 | * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise. |
| 218 | * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise. |
| 219 | * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. |
| 220 | * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise. |
| 221 | * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise. |
| 222 | * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. |
| 223 | * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise. |
| 224 | * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise. |
| 225 | * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise. |
| 226 | * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise. |
| 227 | * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise. |
| 228 | * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed. |
| 229 | (elf_backend_copy_indirect_symbol): Likewise. |
| 230 | * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed. |
| 231 | (elf_backend_copy_indirect_symbol): Likewise. |
| 232 | * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs. |
| 233 | |
| 234 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 235 | |
| 236 | PR ld/26067 |
| 237 | * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New. |
| 238 | * elf32-arm.c (readonly_dynrelocs): Removed. |
| 239 | (maybe_set_textrel): Replace readonly_dynrelocs with |
| 240 | _bfd_elf_readonly_dynrelocs. |
| 241 | * elf32-csky.c (readonly_dynrelocs): Removed. |
| 242 | (maybe_set_textrel): Replace readonly_dynrelocs with |
| 243 | _bfd_elf_readonly_dynrelocs. |
| 244 | * elf32-hppa.c(readonly_dynrelocs): Removed. |
| 245 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with |
| 246 | _bfd_elf_readonly_dynrelocs. |
| 247 | (maybe_set_textrel): Likewise. |
| 248 | * elf32-lm32.c (readonly_dynrelocs): Removed. |
| 249 | (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 250 | with _bfd_elf_readonly_dynrelocs. |
| 251 | (maybe_set_textrel): Likewise. |
| 252 | * elf32-m32r.c (readonly_dynrelocs): Removed. |
| 253 | (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 254 | with _bfd_elf_readonly_dynrelocs. |
| 255 | (maybe_set_textrel): Likewise. |
| 256 | * elf32-metag.c (readonly_dynrelocs): Removed. |
| 257 | (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 258 | with _bfd_elf_readonly_dynrelocs. |
| 259 | (maybe_set_textrel): Likewise. |
| 260 | * elf32-microblaze.c (readonly_dynrelocs): Removed. |
| 261 | (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 262 | with _bfd_elf_readonly_dynrelocs. |
| 263 | * elf32-nds32.c (readonly_dynrelocs): Removed. |
| 264 | (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 265 | with _bfd_elf_readonly_dynrelocs. |
| 266 | (maybe_set_textrel): Likewise. |
| 267 | * elf32-or1k.c (readonly_dynrelocs): Removed. |
| 268 | (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 269 | with _bfd_elf_readonly_dynrelocs. |
| 270 | * elf32-ppc.c (readonly_dynrelocs): Removed. |
| 271 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with |
| 272 | _bfd_elf_readonly_dynrelocs. |
| 273 | (ppc_elf_adjust_dynamic_symbol): Likewise. |
| 274 | (maybe_set_textrel): Likewise. |
| 275 | * elf32-s390.c (readonly_dynrelocs): Removed. |
| 276 | (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 277 | with _bfd_elf_readonly_dynrelocs. |
| 278 | (maybe_set_textrel): Likewise. |
| 279 | * elf32-sh.c (readonly_dynrelocs): Removed. |
| 280 | (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with |
| 281 | _bfd_elf_readonly_dynrelocs. |
| 282 | (maybe_set_textrel): Likewise. |
| 283 | * elf32-tic6x.c (readonly_dynrelocs): Removed. |
| 284 | (maybe_set_textrel): Replace readonly_dynrelocs with |
| 285 | _bfd_elf_readonly_dynrelocs. |
| 286 | * elf32-tilepro.c (readonly_dynrelocs): Removed. |
| 287 | (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 288 | with _bfd_elf_readonly_dynrelocs. |
| 289 | (maybe_set_textrel): Likewise. |
| 290 | * elf64-ppc.c (readonly_dynrelocs): Removed. |
| 291 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with |
| 292 | _bfd_elf_readonly_dynrelocs. |
| 293 | (ppc64_elf_adjust_dynamic_symbol): Likewise. |
| 294 | (maybe_set_textrel): Likewise. |
| 295 | * elf64-s390.c (readonly_dynrelocs): Removed. |
| 296 | (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 297 | with _bfd_elf_readonly_dynrelocs. |
| 298 | (maybe_set_textrel): Likewise. |
| 299 | * elflink.c (_bfd_elf_readonly_dynrelocs): New. |
| 300 | * elfnn-aarch64.c (readonly_dynrelocs): Removed. |
| 301 | (maybe_set_textrel): Replace readonly_dynrelocs with |
| 302 | _bfd_elf_readonly_dynrelocs. |
| 303 | * elfnn-riscv.c (readonly_dynrelocs): Removed. |
| 304 | (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 305 | with _bfd_elf_readonly_dynrelocs. |
| 306 | (maybe_set_textrel): Likewise. |
| 307 | * elfxx-sparc.c (readonly_dynrelocs): Removed. |
| 308 | (_bfd_sparc_elf_adjust_dynamic_symbol): Replace |
| 309 | readonly_dynrelocs with _bfd_elf_readonly_dynrelocs. |
| 310 | (maybe_set_textrel): Likewise. |
| 311 | * elfxx-tilegx.c (readonly_dynrelocs): Removed. |
| 312 | (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs |
| 313 | with _bfd_elf_readonly_dynrelocs. |
| 314 | (maybe_set_textrel): Likewise. |
| 315 | * elfxx-x86.c (readonly_dynrelocs): Removed. |
| 316 | (maybe_set_textrel): Replace readonly_dynrelocs with |
| 317 | _bfd_elf_readonly_dynrelocs. |
| 318 | (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. |
| 319 | |
| 320 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
| 321 | |
| 322 | * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence |
| 323 | -fsanitize=undefined. |
| 324 | |
| 325 | 2020-06-03 Alan Modra <amodra@gmail.com> |
| 326 | |
| 327 | PR 26069 |
| 328 | PR 18758 |
| 329 | * peicode.h (pe_ILF_make_a_section): Align data for compilers |
| 330 | other than gcc. |
| 331 | (pe_ILF_build_a_bfd): Likewise. |
| 332 | |
| 333 | 2020-06-03 Alan Modra <amodra@gmail.com> |
| 334 | |
| 335 | PR 26069 |
| 336 | * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for |
| 337 | core files as well as objects. |
| 338 | |
| 339 | 2020-06-01 H.J. Lu <hongjiu.lu@intel.com> |
| 340 | |
| 341 | PR ld/26067 |
| 342 | * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size. |
| 343 | * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): |
| 344 | Updated. |
| 345 | * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs. |
| 346 | (elf_arc_link_hash_newfunc): Updated. |
| 347 | * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs. |
| 348 | (elf32_arm_link_hash_newfunc): Updated. |
| 349 | (elf32_arm_copy_indirect_symbol): Likewise. |
| 350 | (elf32_arm_check_relocs): Likewise. |
| 351 | (readonly_dynrelocs): Likewise. |
| 352 | (allocate_dynrelocs_for_symbol): Likewise. |
| 353 | * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs. |
| 354 | (csky_elf_link_hash_newfunc): Updated. |
| 355 | (csky_allocate_dynrelocs): Likewise. |
| 356 | (readonly_dynrelocs): Likewise. |
| 357 | (csky_elf_copy_indirect_symbol): Likewise. |
| 358 | * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs. |
| 359 | (hppa_link_hash_newfunc): Updated. |
| 360 | (elf32_hppa_copy_indirect_symbol): Likewise. |
| 361 | (elf32_hppa_hide_symbol): Likewise. |
| 362 | (elf32_hppa_adjust_dynamic_symbol): Likewise. |
| 363 | (allocate_dynrelocs): Likewise. |
| 364 | (elf32_hppa_relocate_section): Likewise. |
| 365 | * elf32-i386.c (elf_i386_check_relocs): Likewise. |
| 366 | * elf32-lm32.c (elf_lm32_link_hash_entry): Removed. |
| 367 | (lm32_elf_link_hash_newfunc): Likewise. |
| 368 | (lm32_elf_link_hash_table_create): Updated. |
| 369 | (readonly_dynrelocs): Likewise. |
| 370 | (allocate_dynrelocs): Likewise. |
| 371 | (lm32_elf_copy_indirect_symbol): Likewise. |
| 372 | * elf32-m32r.c (elf_m32r_link_hash_entry): Removed. |
| 373 | (m32r_elf_link_hash_newfunc): Likewise. |
| 374 | (m32r_elf_link_hash_table_create): Updated. |
| 375 | (m32r_elf_copy_indirect_symbol): Likewise. |
| 376 | (allocate_dynrelocs): Likewise. |
| 377 | * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs. |
| 378 | (metag_link_hash_newfunc): Updated. |
| 379 | (elf_metag_copy_indirect_symbol): Likewise. |
| 380 | (readonly_dynrelocs): Likewise. |
| 381 | (allocate_dynrelocs): Likewise. |
| 382 | * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove |
| 383 | dyn_relocs. |
| 384 | (link_hash_newfunc): Updated. |
| 385 | (microblaze_elf_check_relocs): Likewise. |
| 386 | (microblaze_elf_copy_indirect_symbol): Likewise. |
| 387 | (readonly_dynrelocs): Likewise. |
| 388 | (allocate_dynrelocs): Likewise. |
| 389 | * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs. |
| 390 | (nds32_elf_link_hash_newfunc): Updated. |
| 391 | (nds32_elf_copy_indirect_symbol): Likewise. |
| 392 | (readonly_dynrelocs): Likewise. |
| 393 | (allocate_dynrelocs): Likewise. |
| 394 | (nds32_elf_check_relocs): Likewise. |
| 395 | * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs. |
| 396 | (link_hash_newfunc): Updated. |
| 397 | (nios2_elf32_copy_indirect_symbol): Likewise. |
| 398 | (nios2_elf32_check_relocs): Likewise. |
| 399 | (allocate_dynrelocs): Likewise. |
| 400 | * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs. |
| 401 | (or1k_elf_link_hash_newfunc): Updated. |
| 402 | (readonly_dynrelocs): Likewise. |
| 403 | (allocate_dynrelocs): Likewise. |
| 404 | (or1k_elf_copy_indirect_symbol): Likewise. |
| 405 | * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs. |
| 406 | (ppc_elf_link_hash_newfunc): Updated. |
| 407 | (ppc_elf_copy_indirect_symbol): Likewise. |
| 408 | (ppc_elf_check_relocs): Likewise. |
| 409 | (readonly_dynrelocs): Likewise. |
| 410 | (ppc_elf_adjust_dynamic_symbol): Likewise. |
| 411 | (allocate_dynrelocs): Likewise. |
| 412 | (ppc_elf_relocate_section): Likewise. |
| 413 | * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs. |
| 414 | (link_hash_newfunc): Updated. |
| 415 | (elf_s390_copy_indirect_symbol): Likewise. |
| 416 | (readonly_dynrelocs): Likewise. |
| 417 | (elf_s390_adjust_dynamic_symbol): Likewise. |
| 418 | (allocate_dynrelocs): Likewise. |
| 419 | * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs. |
| 420 | (sh_elf_link_hash_newfunc): Updated. |
| 421 | (readonly_dynrelocs): Likewise. |
| 422 | (allocate_dynrelocs): Likewise. |
| 423 | (sh_elf_copy_indirect_symbol): Likewise. |
| 424 | (sh_elf_check_relocs): Likewise. |
| 425 | * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed. |
| 426 | (elf32_tic6x_link_hash_newfunc): Likewise. |
| 427 | (elf32_tic6x_link_hash_table_create): Updated. |
| 428 | (readonly_dynrelocs): Likewise. |
| 429 | (elf32_tic6x_check_relocs): Likewise. |
| 430 | (elf32_tic6x_allocate_dynrelocs): Likewise. |
| 431 | * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove |
| 432 | dyn_relocs. |
| 433 | (link_hash_newfunc): Updated. |
| 434 | (tilepro_elf_copy_indirect_symbol): Likewise. |
| 435 | (tilepro_elf_check_relocs): Likewise. |
| 436 | (allocate_dynrelocs): Likewise. |
| 437 | * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs. |
| 438 | (ppc64_elf_copy_indirect_symbol): Updated. |
| 439 | (ppc64_elf_check_relocs): Likewise. |
| 440 | (readonly_dynrelocs): Likewise. |
| 441 | (ppc64_elf_adjust_dynamic_symbol): Likewise. |
| 442 | (dec_dynrel_count): Likewise. |
| 443 | (allocate_dynrelocs): Likewise. |
| 444 | (ppc64_elf_relocate_section): Likewise. |
| 445 | * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs. |
| 446 | (link_hash_newfunc): Updated. |
| 447 | (elf_s390_copy_indirect_symbol): Likewise. |
| 448 | (readonly_dynrelocs): Likewise. |
| 449 | (allocate_dynrelocs): Likewise. |
| 450 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. |
| 451 | * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove |
| 452 | dyn_relocs. |
| 453 | (elfNN_aarch64_link_hash_newfunc): Updated. |
| 454 | (elfNN_aarch64_copy_indirect_symbol): Likewise. |
| 455 | (readonly_dynrelocs): Likewise. |
| 456 | (need_copy_relocation_p): Likewise. |
| 457 | (elfNN_aarch64_allocate_dynrelocs): Likewise. |
| 458 | (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise. |
| 459 | * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs. |
| 460 | (link_hash_newfunc): Updated. |
| 461 | (riscv_elf_copy_indirect_symbol): Likewise. |
| 462 | (riscv_elf_check_relocs): Likewise. |
| 463 | (readonly_dynrelocs): Likewise. |
| 464 | (allocate_dynrelocs): Likewise. |
| 465 | * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove |
| 466 | dyn_relocs. |
| 467 | (link_hash_newfunc): Updated. |
| 468 | (_bfd_sparc_elf_copy_indirect_symbol): Likewise. |
| 469 | (_bfd_sparc_elf_check_relocs): Likewise. |
| 470 | (readonly_dynrelocs): Likewise. |
| 471 | (allocate_dynrelocs): Likewise. |
| 472 | * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs. |
| 473 | (link_hash_newfunc): Updated. |
| 474 | (tilegx_elf_copy_indirect_symbol): Likewise. |
| 475 | (tilegx_elf_check_relocs): Likewise. |
| 476 | (readonly_dynrelocs): Likewise. |
| 477 | (allocate_dynrelocs): Likewise. |
| 478 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise. |
| 479 | (readonly_dynrelocs): Likewise. |
| 480 | (_bfd_x86_elf_copy_indirect_symbol): Likewise. |
| 481 | * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs. |
| 482 | |
| 483 | 2020-06-01 Alan Modra <amodra@gmail.com> |
| 484 | |
| 485 | * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current |
| 486 | command against cmd_length, not the end of record. For |
| 487 | ETIR__C_STO_IMMR check size against cmd_length, mask repeat count |
| 488 | to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB |
| 489 | cmd_length test. |
| 490 | |
| 491 | 2020-05-28 David Faust <david.faust@oracle.com> |
| 492 | |
| 493 | * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of |
| 494 | R_BPF_INSN_{32,64} relocations. |
| 495 | |
| 496 | 2020-05-28 Stephen Casner <casner@acm.org> |
| 497 | |
| 498 | * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of |
| 499 | addreses in .long (used in testsuites) and .stab values. |
| 500 | |
| 501 | 2020-05-27 H.J. Lu <hongjiu.lu@intel.com> |
| 502 | |
| 503 | PR ld/22909 |
| 504 | * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check. |
| 505 | Check bfd_link_dll when issue a DT_TEXTREL warning. |
| 506 | * elfxx-x86.c (maybe_set_textrel): Likewise. |
| 507 | (_bfd_x86_elf_size_dynamic_sections): Likewise. |
| 508 | |
| 509 | 2020-05-26 Nick Clifton <nickc@redhat.com> |
| 510 | |
| 511 | * plugin.c (try_load_plugin): Extend error message when a plugin |
| 512 | fails to open. |
| 513 | |
| 514 | 2020-05-23 Alan Modra <amodra@gmail.com> |
| 515 | |
| 516 | * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header. |
| 517 | |
| 518 | 2020-05-22 Alan Modra <amodra@gmail.com> |
| 519 | |
| 520 | PR 25882 |
| 521 | * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP |
| 522 | attributes from shared libraries, and do not return an error if |
| 523 | they don't match. |
| 524 | |
| 525 | 2020-05-21 Alan Modra <amodra@gmail.com> |
| 526 | |
| 527 | PR 25993 |
| 528 | * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd |
| 529 | filename. |
| 530 | (_bfd_delete_bfd): Free the copy. |
| 531 | (_bfd_new_bfd): Free nbfd->memory on error. |
| 532 | |
| 533 | 2020-05-21 Alan Modra <amodra@gmail.com> |
| 534 | |
| 535 | * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout. |
| 536 | * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c, |
| 537 | * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c, |
| 538 | * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c, |
| 539 | * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, |
| 540 | * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c, |
| 541 | * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c, |
| 542 | * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c, |
| 543 | * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c, |
| 544 | * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, |
| 545 | * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c, |
| 546 | * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c, |
| 547 | * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, |
| 548 | * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c |
| 549 | * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h, |
| 550 | * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, |
| 551 | * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c, |
| 552 | * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c, |
| 553 | * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c, |
| 554 | * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise. |
| 555 | |
| 556 | 2020-05-20 Nelson Chu <nelson.chu@sifive.com> |
| 557 | |
| 558 | * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function |
| 559 | get_default_version. It is used to find the default version for |
| 560 | the specific extension. |
| 561 | * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters |
| 562 | default_major_version and default_minor_version. Add new bfd_boolean |
| 563 | parameter *use_default_version. Set it to TRUE if we need to call |
| 564 | the callback rps->get_default_version to find the default version. |
| 565 | (riscv_parse_std_ext): Call rps->get_default_version if we fail to find |
| 566 | the default version in riscv_parsing_subset_version, and then call |
| 567 | riscv_add_subset to add the subset into subset list. |
| 568 | (riscv_parse_prefixed_ext): Likewise. |
| 569 | (riscv_std_z_ext_strtab): Support Zicsr extensions. |
| 570 | * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the |
| 571 | strings rather than characters. |
| 572 | riscv_merge_arch_attr_info): The callback function get_default_version |
| 573 | is only needed for assembler, so set it to NULL int the linker. |
| 574 | * elfxx-riscv.c (riscv_estimate_digit): Remove the static. |
| 575 | * elfxx-riscv.h: Updated. |
| 576 | |
| 577 | 2020-05-20 Alan Modra <amodra@gmail.com> |
| 578 | |
| 579 | PR 25993 |
| 580 | * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename, |
| 581 | use bfd_set_filename. |
| 582 | * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise. |
| 583 | * mach-o.c (bfd_mach_o_fat_member_init): Likewise. |
| 584 | * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw), |
| 585 | (bfd_create): Likewise. |
| 586 | (_bfd_delete_bfd): Don't free filename. |
| 587 | (bfd_set_filename): Copy filename param to bfd_alloc'd memory, |
| 588 | return pointer to the copy or NULL on alloc fail. |
| 589 | * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test |
| 590 | result of bfd_set_filename. |
| 591 | * bfd-in2.h: Regenerate. |
| 592 | |
| 593 | 2020-05-20 Alan Modra <amodra@gmail.com> |
| 594 | |
| 595 | PR 26011 |
| 596 | * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc |
| 597 | section size against file size. |
| 598 | (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise. |
| 599 | |
| 600 | 2020-05-19 Gunther Nikl <gnikl@justmail.de> |
| 601 | |
| 602 | PR 26005 |
| 603 | * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc |
| 604 | and memset when allocating memory for the sections_being_created |
| 605 | array. |
| 606 | |
| 607 | 2020-05-19 Stafford Horne <shorne@gmail.com> |
| 608 | |
| 609 | * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela |
| 610 | to relgot. |
| 611 | (or1k_elf_relocate_section): Access srelgot via |
| 612 | htab->root.srelgot. Add assertions for srelgot->contents. |
| 613 | Introduce local variable for srelgot to not reuse global |
| 614 | sreloc. |
| 615 | (or1k_elf_relocate_section): Fixup dynamic symbol detection. |
| 616 | (or1k_set_got_and_rela_sizes): New function. |
| 617 | (or1k_initial_exec_offset): New function. |
| 618 | (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks. |
| 619 | (or1k_elf_relocate_section): Allow for TLS to handle multiple |
| 620 | model access. |
| 621 | (or1k_elf_check_relocs): Use OR to set TLS access. |
| 622 | (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set |
| 623 | sizes. |
| 624 | (or1k_elf_size_dynamic_sections): Use |
| 625 | or1k_set_got_and_rela_sizes to set sizes. |
| 626 | (or1k_elf_relocate_section): Fixup PCREL relocation calculation. |
| 627 | (TCB_SIZE): New macro. |
| 628 | (tpoff): Use TCB_SIZE and alignment to calculate offset. |
| 629 | (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs) |
| 630 | (or1k_elf_size_dynamic_sections): Rename p to sec_relocs. |
| 631 | (allocate_dynrelocs): Rename s to splt or sgot based on usage. |
| 632 | (tpoff): Add dynamic boolean argument. |
| 633 | (or1k_elf_relocate_section): Pass dynamic flag to tpoff. |
| 634 | |
| 635 | 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com> |
| 636 | |
| 637 | * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club |
| 638 | BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14 |
| 639 | cases with BFD_RELOC_AARCH64_JUMP26. |
| 640 | (elfNN_aarch64_check_relocs): Likewise. |
| 641 | |
| 642 | 2020-05-19 Alan Modra <amodra@gmail.com> |
| 643 | |
| 644 | * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use |
| 645 | bfd_get_filename rather than accessing bfd->filename directly. |
| 646 | * aout-target.h (MY (object_p)): Likewise. |
| 647 | * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise. |
| 648 | * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag), |
| 649 | (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr), |
| 650 | (_bfd_archive_bsd44_construct_extended_name_table), |
| 651 | (_bfd_write_archive_contents, _bfd_compute_and_write_armap), |
| 652 | (_bfd_bsd_write_armap): Likewise. |
| 653 | * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise. |
| 654 | * cache.c (bfd_open_file): Likewise. |
| 655 | * ecoff.c (_bfd_ecoff_write_armap): Likewise. |
| 656 | * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise. |
| 657 | * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. |
| 658 | * elf32-frv.c (elf32_frv_relocate_section): Likewise. |
| 659 | * elf32-hppa.c (elf32_hppa_final_link): Likewise. |
| 660 | * elf32-nds32.c (nds32_elf_output_symbol_hook), |
| 661 | (patch_tls_desc_to_ie): Likewise. |
| 662 | * elf32-spu.c (sort_bfds, print_one_overlay_section), |
| 663 | (spu_elf_auto_overlay): Likewise. |
| 664 | * elf64-hppa.c (elf_hppa_final_link): Likewise. |
| 665 | * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise. |
| 666 | * elfcore.h (elf_core_file_matches_executable_p): Likewise. |
| 667 | * elflink.c (bfd_elf_size_dynamic_sections), |
| 668 | (elf_link_input_bfd): Likewise. |
| 669 | * linker.c (_bfd_generic_link_output_symbols): Likewise. |
| 670 | * mach-o.c (bfd_mach_o_follow_dsym), |
| 671 | (bfd_mach_o_close_and_cleanup): Likewise. |
| 672 | * opncls.c (_bfd_delete_bfd, _maybe_make_executable), |
| 673 | (find_separate_debug_file, get_build_id_name): Likewise. |
| 674 | * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise. |
| 675 | * plugin.c (bfd_plugin_open_input): Likewise. |
| 676 | * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise. |
| 677 | * som.c (som_write_armap): Likewise. |
| 678 | * srec.c (srec_write_record, srec_write_symbols): Likewise. |
| 679 | * vms-lib.c (_bfd_vms_lib_get_imagelib_file), |
| 680 | (_bfd_vms_lib_write_archive_contents): Likewise. |
| 681 | * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise. |
| 682 | |
| 683 | 2020-05-19 Alan Modra <amodra@gmail.com> |
| 684 | |
| 685 | PR 25713 |
| 686 | * bfdio.c (_bfd_real_fopen): Typo fix. |
| 687 | |
| 688 | 2020-05-18 Nick Clifton <nickc@redhat.com> |
| 689 | |
| 690 | PR 26005 |
| 691 | * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory |
| 692 | for the sections_being_created array. |
| 693 | |
| 694 | 2020-05-18 Alan Modra <amodra@gmail.com> |
| 695 | |
| 696 | * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so |
| 697 | they can be freed without also freeing internal_relocs. |
| 698 | |
| 699 | 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com> |
| 700 | |
| 701 | PR 25713 |
| 702 | * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory |
| 703 | separators into DOS style when creating a WIN32 fullpath. |
| 704 | |
| 705 | 2020-05-14 Nelson Chu <nelson.chu@sifive.com> |
| 706 | |
| 707 | * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this |
| 708 | to initialize RISC-V tdata. |
| 709 | |
| 710 | 2020-05-12 Gunther Nikl <gnikl@justmail.de> |
| 711 | |
| 712 | * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported |
| 713 | relocation size. |
| 714 | |
| 715 | 2020-05-11 Alan Modra <amodra@gmail.com> |
| 716 | |
| 717 | * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp. |
| 718 | |
| 719 | 2020-05-11 Alan Modra <amodra@gmail.com> |
| 720 | |
| 721 | * elf64-ppc.c: Rename powerxx to power10 throughout. |
| 722 | |
| 723 | 2020-05-11 Alan Modra <amodra@gmail.com> |
| 724 | |
| 725 | PR 25961 |
| 726 | * coffgen.c (coff_get_normalized_symtab): Check that buffer |
| 727 | contains required number of auxents before processing any auxent. |
| 728 | * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended |
| 729 | file name from auxents for PE. |
| 730 | |
| 731 | 2020-05-04 Gunther Nikl <gnikl@justmail.de> |
| 732 | |
| 733 | * aout-cris.c (DEFAULT_ARCH): Delete define. |
| 734 | (MY_set_arch_mach): Likewise. |
| 735 | (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture |
| 736 | of bfd_arch_cris. |
| 737 | (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits |
| 738 | of r_type before the shift. |
| 739 | |
| 740 | 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com> |
| 741 | |
| 742 | PR ld/25665 |
| 743 | * elfnn-aarch64.c (group_sections): Copy implementation from |
| 744 | elf32-arm.c. |
| 745 | |
| 746 | 2020-05-01 Alan Modra <amodra@gmail.com> |
| 747 | |
| 748 | PR 25900 |
| 749 | * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before |
| 750 | accessing root.u.def of symbols. Also check root.u.def.section |
| 751 | is non-NULL. Reverse tests so as to make the logic positive. |
| 752 | |
| 753 | 2020-05-01 Alan Modra <amodra@gmail.com> |
| 754 | |
| 755 | PR 25882 |
| 756 | * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer |
| 757 | Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output. |
| 758 | |
| 759 | 2020-05-01 Alan Modra <amodra@gmail.com> |
| 760 | |
| 761 | PR 25882 |
| 762 | * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME. |
| 763 | * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. |
| 764 | * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise. |
| 765 | * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. |
| 766 | * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. |
| 767 | * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. |
| 768 | * elf32-sh.c (sh_elf_merge_private_data): Likewise. |
| 769 | * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. |
| 770 | * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. |
| 771 | * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. |
| 772 | |
| 773 | 2020-05-01 Alan Modra <amodra@gmail.com> |
| 774 | |
| 775 | PR 25882 |
| 776 | * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags |
| 777 | from shared libraries. |
| 778 | |
| 779 | 2020-04-29 Max Filippov <jcmvbkbc@gmail.com> |
| 780 | |
| 781 | * elf32-xtensa.c (relax_section): Don't negate diff_value for |
| 782 | XTENSA_NDIFF relocations. Don't add sign bits whe diff_value |
| 783 | equals 0. Report overflow when the result has negative sign but |
| 784 | all significant bits are zero. |
| 785 | |
| 786 | 2020-04-29 Gunther Nikl <gnikl@justmail.de> |
| 787 | |
| 788 | * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations. |
| 789 | (aout_link_reloc_link_order): Likewise. Make r_length an unsigned. |
| 790 | |
| 791 | 2020-04-28 Alan Modra <amodra@gmail.com> |
| 792 | |
| 793 | * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check. |
| 794 | Emit warning message. |
| 795 | |
| 796 | 2020-04-27 Tamar Christina <tamar.christina@arm.com> |
| 797 | |
| 798 | * coff-i386.c (COFF_WITH_PE_BIGOBJ): New. |
| 799 | * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New. |
| 800 | * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec |
| 801 | to x86_64_pe_big_vec as it not a big-endian format. |
| 802 | (vec i386_pe_big_vec): New. |
| 803 | * configure.ac: Likewise. |
| 804 | * targets.c: Likewise. |
| 805 | * configure: Regenerate. |
| 806 | * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG, |
| 807 | COFF_WITH_PE_BIGOBJ): New. |
| 808 | * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG): |
| 809 | New. |
| 810 | (x86_64_pe_be_vec): Moved. |
| 811 | |
| 812 | 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com> |
| 813 | |
| 814 | * elf-bfd.h (elfcore_write_arc_v2): Add prototype. |
| 815 | * elf.c (elfcore_grok_arc_v2): New function. |
| 816 | (elfcore_grok_note): Call the new function to handle the corresponding |
| 817 | note. |
| 818 | (elfcore_write_arc_v2): New function. |
| 819 | (elfcore_write_register_note): Call the new function to handle the |
| 820 | corresponding pseudo-sections. |
| 821 | |
| 822 | 2020-04-22 Max Filippov <jcmvbkbc@gmail.com> |
| 823 | |
| 824 | PR ld/25861 |
| 825 | * bfd-in2.h: Regenerated. |
| 826 | * elf32-xtensa.c (elf_howto_table): New entries for |
| 827 | R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}. |
| 828 | (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc) |
| 829 | (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and |
| 830 | R_XTENSA_NDIFF{8,16,32}. |
| 831 | * libbfd.h (bfd_reloc_code_real_names): Add names for |
| 832 | BFD_RELOC_XTENSA_PDIFF{8,16,32} and |
| 833 | BFD_RELOC_XTENSA_NDIFF{8,16,32}. |
| 834 | * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32} |
| 835 | and BFD_RELOC_XTENSA_NDIFF{8,16,32}. |
| 836 | |
| 837 | 2020-04-21 Tamar Christina <tamar.christina@arm.com> |
| 838 | |
| 839 | PR binutils/24753 |
| 840 | * compress.c (bfd_get_full_section_contents): Exclude sections with no |
| 841 | content. |
| 842 | |
| 843 | 2020-04-21 H.J. Lu <hongjiu.lu@intel.com> |
| 844 | |
| 845 | PR ld/25849 |
| 846 | * elf-bfd.h (elf_backend_data): Add |
| 847 | elf_backend_strip_zero_sized_dynamic_sections. |
| 848 | (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype. |
| 849 | * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections): |
| 850 | New macro. |
| 851 | * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New |
| 852 | function. |
| 853 | * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections): |
| 854 | New macro. |
| 855 | (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections. |
| 856 | |
| 857 | 2020-04-21 H.J. Lu <hongjiu.lu@intel.com> |
| 858 | |
| 859 | * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with |
| 860 | sec. |
| 861 | (elf64_alpha_check_relocs): Set sec instead of reltext. Warn |
| 862 | DT_TEXTREL with -M. |
| 863 | (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M. |
| 864 | |
| 865 | 2020-04-21 Nick Clifton <nickc@redhat.com> |
| 866 | |
| 867 | * po/sr.po: Updated Serbian translation. |
| 868 | |
| 869 | 2020-04-21 Alan Modra <amodra@gmail.com> |
| 870 | |
| 871 | * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32 |
| 872 | processing. |
| 873 | |
| 874 | 2020-04-20 Stephen Casner <casner@acm.org> |
| 875 | |
| 876 | * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT |
| 877 | causing globals from linker script to be treated as debug symbols. |
| 878 | (translate_symbol_table): Don't sign-extend symbol values from 16 |
| 879 | to 64 bits in nm output. |
| 880 | |
| 881 | 2020-04-20 Alan Modra <amodra@gmail.com> |
| 882 | |
| 883 | * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too. |
| 884 | |
| 885 | 2020-04-18 Alan Modra <amodra@gmail.com> |
| 886 | |
| 887 | * section.c (bfd_is_const_section): Correct test for special |
| 888 | sections. |
| 889 | * bfd-in2.h: Regenerate. |
| 890 | |
| 891 | 2020-04-17 Alan Modra <amodra@gmail.com> |
| 892 | |
| 893 | PR 25842 |
| 894 | * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on |
| 895 | NULL nodename. |
| 896 | |
| 897 | 2020-04-16 Nick Clifton <nickc@redhat.com> |
| 898 | |
| 899 | PR 25803 |
| 900 | * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an |
| 901 | abort with a more helpful error message. |
| 902 | |
| 903 | 2020-04-16 Alan Modra <amodra@gmail.com> |
| 904 | |
| 905 | PR 25827 |
| 906 | * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't |
| 907 | strdup(0). |
| 908 | |
| 909 | 2020-04-15 Fangrui Song <maskray@google.com> |
| 910 | |
| 911 | PR binutils/24613 |
| 912 | * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR |
| 913 | to RM_DIAGNOSE plus a check of warn_unresolved_syms. |
| 914 | * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise. |
| 915 | * elf-bfd.h (_bfd_elf_large_com_section): Likewise. |
| 916 | * elf32-m32r.c (m32r_elf_relocate_section): Likewise. |
| 917 | * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. |
| 918 | * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. |
| 919 | * elf32-sh.c (sh_elf_relocate_section): Likewise. |
| 920 | * elf32-spu.c (spu_elf_relocate_section): Likewise. |
| 921 | * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. |
| 922 | * elflink.c (elf_link_output_extsym): Likewise. |
| 923 | * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. |
| 924 | |
| 925 | 2020-04-15 Alan Modra <amodra@gmail.com> |
| 926 | |
| 927 | PR 25823 |
| 928 | * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a |
| 929 | pointer into strings that may be freed for section name, always |
| 930 | allocate a new string. |
| 931 | |
| 932 | 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de> |
| 933 | Jan W. Jagersma <jwjagersma@gmail.com> |
| 934 | |
| 935 | * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL) |
| 936 | (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define. |
| 937 | (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out) |
| 938 | (_bfd_go32_mkobject): New functions. |
| 939 | * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL) |
| 940 | (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define. |
| 941 | (go32exe_mkobject): Call _bfd_go32_mkobject. |
| 942 | * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define. |
| 943 | (coff_set_alignment_hook): Define function for COFF_GO32_EXE |
| 944 | and COFF_GO32. |
| 945 | (coff_write_relocs): Enable extended reloc counter code if |
| 946 | COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32. |
| 947 | (coff_write_object_contents): Likewise. Pad section headers |
| 948 | for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out |
| 949 | instead of coff_swap_scnhdr_out. |
| 950 | * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to |
| 951 | enable extended reloc counter. |
| 952 | * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out): |
| 953 | Declare with ATTRIBUTE_UNUSED. |
| 954 | * libcoff-in.h: (struct coff_tdata): New field go32. |
| 955 | (obj_go32): Define. |
| 956 | * libcoff.h: Regenerate. |
| 957 | |
| 958 | 2020-04-14 Fangrui Song <maskray@google.com> |
| 959 | |
| 960 | PR gas/25768 |
| 961 | * elf.c (assign_section_numbers): Always set .stab sh_entsize to |
| 962 | 12. |
| 963 | |
| 964 | 2020-04-14 Stephen Casner <casner@acm.org> |
| 965 | |
| 966 | PR ld/25677 |
| 967 | * pdp11.c: Add implementation of --imagic option. |
| 968 | (adjust_o_magic): Fix objcopy --extract-symbol test. |
| 969 | * libaout.h (enum aout_magic): Add i_magic. |
| 970 | |
| 971 | 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
| 972 | Nick Clifton <nickc@redhat.com> |
| 973 | |
| 974 | * elf32-sparc.c (sparc_final_write_processing): Fix whitespace. |
| 975 | <0>: Ignore. |
| 976 | <default>: Error rather than abort. |
| 977 | |
| 978 | 2020-04-03 H.J. Lu <hongjiu.lu@intel.com> |
| 979 | |
| 980 | PR ld/25767 |
| 981 | * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized |
| 982 | relocation section from section group. |
| 983 | |
| 984 | 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com> |
| 985 | |
| 986 | * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add |
| 987 | bfd->origin to file offset. |
| 988 | * bfdwin.c (bfd_get_file_window): Likewise. |
| 989 | * bfd.c: Clarify the use of the bfd->origin field. |
| 990 | * bfd-in2.h: Regenerate. |
| 991 | * coff-i386.c: Don't include go32exe.h. Allow overriding |
| 992 | coff_write_object_contents via COFF_WRITE_CONTENTS. |
| 993 | * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject) |
| 994 | (go32exe_write_object_contents): New functions. |
| 995 | (go32exe_temp_stub, go32exe_temp_stub_size): New static globals. |
| 996 | (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define. |
| 997 | (create_go32_stub): Remove check for 2k size limit. Read stub |
| 998 | from go32exe_temp_stub if present. |
| 999 | (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and |
| 1000 | copy variable-length stub. |
| 1001 | (go32_check_format): Read stub to go32exe_temp_stub, set |
| 1002 | origin, return go32exe_cleanup. |
| 1003 | (adjust_filehdr_in_post, adjust_filehdr_out_pre) |
| 1004 | (adjust_filehdr_out_post, adjust_scnhdr_in_post) |
| 1005 | (adjust_scnhdr_out_pre, adjust_scnhdr_out_post) |
| 1006 | (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post): |
| 1007 | Remove functions and their associated #defines. |
| 1008 | * coffcode.h (coff_mkobject_hook): Remove stub copying code. |
| 1009 | * libcoff-in.h: (struct coff_tdata): New field stub_size. |
| 1010 | Rename field go32stub to stub. |
| 1011 | * libcoff.h: Regenerate. |
| 1012 | * coff-stgo32.c (go32_check_format): Rename to... |
| 1013 | (go32exe_check_format): ...this. |
| 1014 | (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to... |
| 1015 | (go32exe_copy_private_bfd_data): ...this. |
| 1016 | (stub_bytes): Rename to... |
| 1017 | (go32exe_default_stub): ...this. |
| 1018 | (create_go32_stub): Rename to... |
| 1019 | (go32exe_create_stub): ...this. |
| 1020 | * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc |
| 1021 | when possible. |
| 1022 | |
| 1023 | 2020-04-01 H.J. Lu <hongjiu.lu@intel.com> |
| 1024 | |
| 1025 | PR ld/25749 |
| 1026 | PR ld/25754 |
| 1027 | * elf32-i386.c (elf_i386_convert_load_reloc): Convert load |
| 1028 | relocation to R_386_32 for relocation against non-preemptible |
| 1029 | absolute symbol. |
| 1030 | (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't |
| 1031 | allocate dynamic relocation for non-preemptible absolute symbol. |
| 1032 | (elf_i386_relocate_section): Pass sec to |
| 1033 | GENERATE_DYNAMIC_RELOCATION_P. |
| 1034 | * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved. |
| 1035 | (elf_x86_64_convert_load_reloc): Covert load relocation to |
| 1036 | R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible |
| 1037 | absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32 |
| 1038 | for non-preemptible absolute symbol if they overflow. |
| 1039 | (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set |
| 1040 | tls_type for GOT slot to GOT_ABS for non-preemptible absolute |
| 1041 | symbol. Don't allocate dynamic relocation for non-preemptible |
| 1042 | absolute symbol. |
| 1043 | (elf_x86_64_relocate_section): Don't generate relative relocation |
| 1044 | for GOTPCREL relocations aganst local absolute symbol. Pass sec |
| 1045 | to GENERATE_DYNAMIC_RELOCATION_P. |
| 1046 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation |
| 1047 | against non-preemptible absolute symbol. |
| 1048 | (_bfd_elf_x86_valid_reloc_p): New function. |
| 1049 | (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for |
| 1050 | GOT_ABS GOT slot. |
| 1051 | * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC |
| 1052 | argument. Don't generate dynamic relocation against |
| 1053 | non-preemptible absolute symbol. |
| 1054 | (ABS_SYMBOL_P): New. |
| 1055 | (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation |
| 1056 | against non-preemptible absolute symbol. |
| 1057 | (GOT_ABS): New. |
| 1058 | (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c. |
| 1059 | (_bfd_elf_x86_valid_reloc_p): New. |
| 1060 | |
| 1061 | 2020-04-01 Tamar Christina <tamar.christina@arm.com> |
| 1062 | |
| 1063 | PR ld/16017 |
| 1064 | * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0 |
| 1065 | address in the GOT if in thumb only mode. |
| 1066 | |
| 1067 | 2020-04-01 Tamar Christina <tamar.christina@arm.com> |
| 1068 | |
| 1069 | * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset. |
| 1070 | |
| 1071 | 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com> |
| 1072 | |
| 1073 | * mmo.c (mmo_scan): Create .text section only when needed, not |
| 1074 | from the start. |
| 1075 | |
| 1076 | 2020-03-31 Alan Modra <amodra@gmail.com> |
| 1077 | |
| 1078 | * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread |
| 1079 | return value check. |
| 1080 | |
| 1081 | 2020-03-31 Alan Modra <amodra@gmail.com> |
| 1082 | |
| 1083 | * vms-alpha.c (image_write): Check bounds for sections without |
| 1084 | contents too. Error on non-zero write to section without |
| 1085 | contents. |
| 1086 | (_bfd_vms_slurp_etir): Check return of image_write* functions. |
| 1087 | |
| 1088 | 2020-03-31 Alan Modra <amodra@gmail.com> |
| 1089 | |
| 1090 | * tekhex.c (pass_over): Check is_eof before reading buffer. |
| 1091 | |
| 1092 | 2020-03-30 Nick Clifton <nickc@redhat.com> |
| 1093 | |
| 1094 | PR binutils/pr25662 |
| 1095 | * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp |
| 1096 | field to timestamp and make it an integer. |
| 1097 | * libcoff.h: Regenerate. |
| 1098 | * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp |
| 1099 | field in the pe_data structure rather than the insert_timestamp |
| 1100 | field. |
| 1101 | |
| 1102 | 2020-03-30 Alan Modra <amodra@gmail.com> |
| 1103 | |
| 1104 | PR 25745 |
| 1105 | * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form |
| 1106 | statistics message. |
| 1107 | |
| 1108 | 2020-03-26 Nick Clifton <nickc@redhat.com> |
| 1109 | |
| 1110 | * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete. |
| 1111 | * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove |
| 1112 | prototype. |
| 1113 | * libbfd.h: Regenerate. |
| 1114 | |
| 1115 | 2020-03-26 Alan Modra <amodra@gmail.com> |
| 1116 | |
| 1117 | * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread. |
| 1118 | |
| 1119 | 2020-03-26 Alan Modra <amodra@gmail.com> |
| 1120 | |
| 1121 | * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets |
| 1122 | array. |
| 1123 | (_bfd_vms_slurp_object_records): Rename "err" to "ok". |
| 1124 | |
| 1125 | 2020-03-25 Nick Clifton <nickc@redhat.com> |
| 1126 | |
| 1127 | * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New |
| 1128 | function. |
| 1129 | * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype. |
| 1130 | * libbfd.h: Regenerate. |
| 1131 | |
| 1132 | 2020-03-25 Shahab Vahedi <shahab@synopsys.com> |
| 1133 | |
| 1134 | * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the |
| 1135 | correct field name in the output string. |
| 1136 | |
| 1137 | 2020-03-25 Alan Modra <amodra@gmail.com> |
| 1138 | |
| 1139 | PR 25662 |
| 1140 | * elf.c (assign_file_positions_for_load_sections): Adjust offset |
| 1141 | for SHT_NOBITS section if first in segment. |
| 1142 | |
| 1143 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
| 1144 | |
| 1145 | PR binutils/25708 |
| 1146 | * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ... |
| 1147 | (_bfd_elf_get_symbol_version_string): This. |
| 1148 | * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ... |
| 1149 | (_bfd_elf_get_symbol_version_string): This. |
| 1150 | (bfd_elf_print_symbol): Pass TRUE to |
| 1151 | _bfd_elf_get_symbol_version_string. |
| 1152 | * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a |
| 1153 | bfd_boolean argument. |
| 1154 | * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise. |
| 1155 | * targets.c (_bfd_get_symbol_version_string): Likewise. |
| 1156 | (bfd_get_symbol_version_string): Likewise. |
| 1157 | * bfd-in2.h: Regenerated. |
| 1158 | |
| 1159 | 2020-03-24 Nick Clifton <nickc@redhat.com> |
| 1160 | Jaydeep Chauhan <jaydeepchauhan1494@gmail.com> |
| 1161 | |
| 1162 | PR 25713 |
| 1163 | * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on |
| 1164 | Win32 systems. |
| 1165 | |
| 1166 | 2020-03-24 Nick Clifton <nickc@redhat.com> |
| 1167 | |
| 1168 | PR 25681 |
| 1169 | * elf.c (_bfd_elf_map_sections_to_segments): When looking for a |
| 1170 | segment to use for PT_GNU_RELRO, ignore empty sections in a |
| 1171 | segment's current list. |
| 1172 | |
| 1173 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
| 1174 | |
| 1175 | PR binutils/25717 |
| 1176 | * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int. |
| 1177 | |
| 1178 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
| 1179 | |
| 1180 | PR binutils/25708 |
| 1181 | * elf-bfd.h (_bfd_elf_get_symbol_version_name): New. |
| 1182 | * elf.c (_bfd_elf_get_symbol_version_name): New function. Based |
| 1183 | on the previous _bfd_elf_get_symbol_version_string. |
| 1184 | (_bfd_elf_get_symbol_version_string): Use it. |
| 1185 | |
| 1186 | 2020-03-24 Alan Modra <amodra@gmail.com> |
| 1187 | |
| 1188 | * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended |
| 1189 | name size. Use bfd_malloc rather than bfd_zmalloc, clearing just |
| 1190 | struct areltdata. |
| 1191 | |
| 1192 | 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de> |
| 1193 | |
| 1194 | * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment. |
| 1195 | |
| 1196 | 2020-03-23 Alan Modra <amodra@gmail.com> |
| 1197 | |
| 1198 | * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and |
| 1199 | symbol count. Allocate an extra byte to ensure name strings |
| 1200 | are terminated. Sanity check name offsets. Release memory on |
| 1201 | error return. |
| 1202 | |
| 1203 | 2020-03-23 Alan Modra <amodra@gmail.com> |
| 1204 | |
| 1205 | * i386msdos.c (msdos_object_p): Don't access e_lfanew when that |
| 1206 | field hasn't been read. Remove unnecessary casts. |
| 1207 | |
| 1208 | 2020-03-22 Alan Modra <amodra@gmail.com> |
| 1209 | |
| 1210 | * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large |
| 1211 | enough to read number of symbols. |
| 1212 | |
| 1213 | 2020-03-20 H.J. Lu <hongjiu.lu@intel.com> |
| 1214 | |
| 1215 | * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed. |
| 1216 | (EXECUTABLE_SUFFIX): Likewise. |
| 1217 | * config.in: Regenerated. |
| 1218 | * configure: Likewise. |
| 1219 | * plugin.c (bfd_plugin_close_and_cleanup): Defined as |
| 1220 | _bfd_generic_close_and_cleanup. |
| 1221 | (plugin_list_entry): Remove resolution_file, resolution_option, |
| 1222 | real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc, |
| 1223 | lto_wrapper, gcc_env and initialized, |
| 1224 | (need_lto_wrapper_p): Removed. |
| 1225 | (get_lto_wrapper): Likewise. |
| 1226 | (setup_lto_wrapper_env): Likewise. |
| 1227 | (register_all_symbols_read): Likewise. |
| 1228 | (egister_cleanup): Likewise. |
| 1229 | (get_symbols): Likewise. |
| 1230 | (add_input_file): Likewise. |
| 1231 | (bfd_plugin_set_program_name): Remove need_lto_wrapper. |
| 1232 | (add_symbols): Updated. |
| 1233 | (try_claim): Likewise. |
| 1234 | (try_load_plugin): Likewise. |
| 1235 | (bfd_plugin_canonicalize_symtab): Likewise. |
| 1236 | * plugin.h (bfd_plugin_set_program_name): Remove int argument. |
| 1237 | (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms. |
| 1238 | |
| 1239 | 2020-03-19 H.J. Lu <hongjiu.lu@intel.com> |
| 1240 | |
| 1241 | PR binutils/25640 |
| 1242 | * plugin.c (plugin_list_entry): Add has_symbol_type. |
| 1243 | (add_symbols_v2): New function. |
| 1244 | (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin |
| 1245 | provides symbol type. |
| 1246 | (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2. |
| 1247 | (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if |
| 1248 | available. |
| 1249 | |
| 1250 | 2020-03-20 Alan Modra <amodra@gmail.com> |
| 1251 | |
| 1252 | * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large |
| 1253 | enough to read number of symbols. |
| 1254 | |
| 1255 | 2020-03-20 Alan Modra <amodra@gmail.com> |
| 1256 | |
| 1257 | * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL |
| 1258 | backend functions for NULL before calling. |
| 1259 | (copy_special_section_fields, _bfd_elf_copy_private_bfd_data), |
| 1260 | (bfd_section_from_shdr, assign_section_numbers): Likewise. |
| 1261 | * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise. |
| 1262 | * elfnn-ia64.c (ignore_errors): New function. |
| 1263 | (elf_backend_link_order_error_handler): Redefine as ignore_errors. |
| 1264 | |
| 1265 | 2020-03-19 Nick Clifton <nickc@redhat.com> |
| 1266 | |
| 1267 | PR 25676 |
| 1268 | * dwarf2.c (struct varinfo): Add unit_offset field to record the |
| 1269 | location of the varinfo in the unit's debug info data. Change the |
| 1270 | type of the stack field to a boolean. |
| 1271 | (lookup_var_by_offset): New function. Returns the varinfo |
| 1272 | structure for the variable described at the given offset in the |
| 1273 | unit's debug info. |
| 1274 | (scan_unit_for_symbols): Add support for variables which have the |
| 1275 | DW_AT_specification attribute. |
| 1276 | |
| 1277 | 2020-03-19 Nick Clifton <nickc@redhat.com> |
| 1278 | |
| 1279 | PR 25699 |
| 1280 | * elf.c (bfd_elf_set_group_contents): Replace assertion with an |
| 1281 | error return. |
| 1282 | |
| 1283 | 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de> |
| 1284 | |
| 1285 | * elfxx-riscv.c (riscv_parse_subset): Don't use C99. |
| 1286 | |
| 1287 | 2020-03-18 Nick Clifton <nickc@redhat.com> |
| 1288 | |
| 1289 | PR 25673 |
| 1290 | * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal |
| 1291 | memory access when processing a corrupt secondary reloc section. |
| 1292 | |
| 1293 | 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org> |
| 1294 | |
| 1295 | * elf32-arm.c (arm_build_one_stub): Emit a fatal error message |
| 1296 | instead of calling abort. |
| 1297 | * elf32-csky.c (csky_build_one_stub): Likewise. |
| 1298 | * elf32-hppa.c (hppa_build_one_stub): Likewise. |
| 1299 | * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. |
| 1300 | * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. |
| 1301 | * elf32-metag.c (metag_build_one_stub): Likewise. |
| 1302 | * elf32-nios2.c (nios2_build_one_stub): Likewise. |
| 1303 | * elf64-ppc.c (ppc_build_one_stub): Likewise. |
| 1304 | (ppc_size_one_stub): Likewise. |
| 1305 | * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. |
| 1306 | |
| 1307 | 2020-03-17 Nick Clifton <nickc@redhat.com> |
| 1308 | |
| 1309 | PR 25688 |
| 1310 | * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions |
| 1311 | with error messages. |
| 1312 | |
| 1313 | 2020-03-17 Nick Clifton <nickc@redhat.com> |
| 1314 | |
| 1315 | PR 25687 |
| 1316 | * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant |
| 1317 | free. Add free on another failure path. |
| 1318 | |
| 1319 | 2020-03-16 Alan Modra <amodra@gmail.com> |
| 1320 | |
| 1321 | PR 25675 |
| 1322 | * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless |
| 1323 | we have a non-zero section count. Do lma comparison in octets. |
| 1324 | |
| 1325 | 2020-03-16 Alan Modra <amodra@gmail.com> |
| 1326 | |
| 1327 | * vms-alpha.c (dst_restore_location): Validate index into |
| 1328 | dst_ptr_offsets array before accessing. Return status. |
| 1329 | (dst_retrieve_location): Similarly, making "loc" parameter a |
| 1330 | pointer to return value. |
| 1331 | (_bfd_vms_slurp_etir): Update calls to above functions. |
| 1332 | |
| 1333 | 2020-03-14 Kamil Rytarowski <n54@gmx.com> |
| 1334 | |
| 1335 | * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips |
| 1336 | targets. |
| 1337 | * configure: Regenerated. |
| 1338 | |
| 1339 | 2020-03-14 Alan Modra <amodra@gmail.com> |
| 1340 | |
| 1341 | * section.c (BFD_FAKE_SECTIONS): Formatting. |
| 1342 | * bfd-in2.h: Regenerate. |
| 1343 | |
| 1344 | 2020-03-13 Kamil Rytarowski <n54@gmx.com> |
| 1345 | |
| 1346 | * elf.c (elfcore_grok_netbsd_note): Add support for |
| 1347 | NT_NETBSDCORE_LWPSTATUS notes. |
| 1348 | |
| 1349 | 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org> |
| 1350 | |
| 1351 | * bfd-in2.h: Regenerate. |
| 1352 | * section.c (asection): Add already_assigned field. |
| 1353 | (BFD_FAKE_SECTION): Add default initializer for it. |
| 1354 | * ecoff.c (bfd_debug_section): Initialize already_assigned field. |
| 1355 | * elf32-arm.c (arm_build_one_stub): Add support for |
| 1356 | non_contiguous_regions. |
| 1357 | * elf32-csky.c (csky_build_one_stub): Likewise. |
| 1358 | * elf32-hppa.c (hppa_build_one_stub): Likewise. |
| 1359 | * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. |
| 1360 | * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. |
| 1361 | * elf32-metag.c (metag_build_one_stub): Likewise. |
| 1362 | * elf32-nios2.c (nios2_build_one_stub): Likewise. |
| 1363 | * elf64-ppc.c (ppc_build_one_stub): Likewise. |
| 1364 | (ppc_size_one_stub): Likewise. |
| 1365 | * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. |
| 1366 | * elflink.c (elf_link_input_bfd): Likewise. |
| 1367 | |
| 1368 | 2020-03-13 H.J. Lu <hongjiu.lu@intel.com> |
| 1369 | |
| 1370 | PR ld/24920 |
| 1371 | * elf-linker-x86.h (elf_linker_x86_params): Add |
| 1372 | static_before_all_inputs and has_dynamic_linker. |
| 1373 | * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report |
| 1374 | dynamic input objects if -static is passed at command-line |
| 1375 | before all input files without --dynamic-linker unless |
| 1376 | --no-dynamic-linker is used. |
| 1377 | |
| 1378 | 2020-03-13 Kamil Rytarowski <n54@gmx.com> |
| 1379 | |
| 1380 | * elf.c (elfcore_grok_netbsd_note): Add support for aarch64. |
| 1381 | |
| 1382 | 2020-03-13 Christian Eggers <ceggers@gmx.de> |
| 1383 | |
| 1384 | * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of |
| 1385 | "p_paddr" from "at". |
| 1386 | * elfcode.h (bfd_from_remote_memory): Add units to several |
| 1387 | parameters. New local "opb". Fix usage of p_align. Fix |
| 1388 | calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix |
| 1389 | call of target_read_memory. |
| 1390 | * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix |
| 1391 | calculation of "offset" and "output_offset". |
| 1392 | (bfd_elf_final_link): New local "opb". Fix calculation of "size" |
| 1393 | from "offset" and fix calculation of "end" from "vma+size". Fix |
| 1394 | comparison between "sh_addr" and "vma"/"output_offset". |
| 1395 | (bfd_elf_discard_info): Fix calculation of "eh_alignment". |
| 1396 | * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size |
| 1397 | member. |
| 1398 | * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/ |
| 1399 | octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of |
| 1400 | "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix |
| 1401 | assignment of p_paddr from phdr_lma. Fix comparison between |
| 1402 | "lma+size" and "next->lma". |
| 1403 | (elf_sort_segments): Fix assignment from p_paddr to lma. |
| 1404 | (assign_file_positions_for_load_sections): Add unit (bytes) to |
| 1405 | local "align". Fix calculation of local "off_adjust". Fix |
| 1406 | calculation of local "filehdr_vaddr". |
| 1407 | (assign_file_positions_for_non_load_sections): New local "opb". |
| 1408 | Fix calculation of "end" from "p_size". Fix comparison between |
| 1409 | "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz" |
| 1410 | from "end" and "p_vaddr". |
| 1411 | (rewrite_elf_program_header): Fix comparison between p_vaddr and |
| 1412 | vma. Fix assignment to p_paddr from lma. Fix comparison between |
| 1413 | p_paddr and lma. Fix assignment to p_paddr from lma. |
| 1414 | * merge.c (sec_merge_emit): New local "opb". Convert |
| 1415 | "alignment_power" to octets. |
| 1416 | (_bfd_add_merge_section): New locals "alignment_power" and |
| 1417 | "opb". Fix comparison between "alignment_power" and |
| 1418 | "sizeof(align)". |
| 1419 | (_bfd_merge_sections): New local "opb". Divide size by opb |
| 1420 | before checking align mask. |
| 1421 | |
| 1422 | 2020-03-13 Christian Eggers <ceggers@gmx.de> |
| 1423 | |
| 1424 | * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp |
| 1425 | opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting |
| 1426 | section LMA/VMA. |
| 1427 | (_bfd_elf_make_section_from_phdr): Similarly. |
| 1428 | (elf_fake_sections): Fix calculation of |
| 1429 | Elf_Internal_shdr::sh_addr from section VMA. |
| 1430 | (_bfd_elf_map_sections_to_segments): Fix mixup between octets |
| 1431 | and bytes. |
| 1432 | (assign_file_positions_for_load_sections): Fix calculations of |
| 1433 | Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix |
| 1434 | comparison between program header address and section LMA. |
| 1435 | (assign_file_positions_for_non_load_sections): Likewise. |
| 1436 | (rewrite_elf_program_header): Likewise. Introduce new temp opb. |
| 1437 | (IS_CONTAINED_BY_VMA): Add parameter opb. |
| 1438 | (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT, |
| 1439 | INCLUDE_SECTION_IN_SEGMENT): Likewise. |
| 1440 | (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT. |
| 1441 | Fix calculations of p_addr_valid and p_vaddr_offset. |
| 1442 | * elflink.c (elf_link_add_object_symbols): Multiply section VMA |
| 1443 | with octets per byte when comparing against p_vaddr. |
| 1444 | |
| 1445 | 2020-03-11 Alan Modra <amodra@gmail.com> |
| 1446 | |
| 1447 | * som.c (setup_sections): Sanity check subspace.name. |
| 1448 | |
| 1449 | 2020-03-11 Alan Modra <amodra@gmail.com> |
| 1450 | |
| 1451 | * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. |
| 1452 | |
| 1453 | 2020-03-10 Alan Modra <amodra@gmail.com> |
| 1454 | |
| 1455 | PR 25648 |
| 1456 | * ihex.c (ihex_write_object_contents): Don't assume ordering of |
| 1457 | addresses here. |
| 1458 | |
| 1459 | 2020-03-09 Alan Modra <amodra@gmail.com> |
| 1460 | |
| 1461 | * wasm-module.c (wasm_scan): Sanity check file name length |
| 1462 | before allocating memory. Move common section setup code. Do |
| 1463 | without bfd_tell to calculate section size. |
| 1464 | |
| 1465 | 2020-03-06 Nick Clifton <nickc@redhat.com> |
| 1466 | |
| 1467 | * elf.c (_bfd_elf_set_section_contents): Replace call to abort |
| 1468 | with error messages and failure return values. |
| 1469 | |
| 1470 | 2020-03-05 Max Filippov <jcmvbkbc@gmail.com> |
| 1471 | |
| 1472 | * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic |
| 1473 | relocation sections for any removed reference to a dynamic symbol. |
| 1474 | |
| 1475 | 2020-03-05 Nick Clifton <nickc@redhat.com> |
| 1476 | |
| 1477 | * elf-bfd.h (struct elf_backend_data): Add new fields: |
| 1478 | init_secondary_reloc_section, slurp_secondary_reloc_section, |
| 1479 | write_secondary_reloc_section. |
| 1480 | (_bfd_elf_init_secondary_reloc_section): Prototype. |
| 1481 | (_bfd_elf_slurp_secondary_reloc_section): Prototype. |
| 1482 | (_bfd_elf_write_secondary_reloc_section): Prototype. |
| 1483 | * elf.c ( bfd_section_from_shdr): Invoke the new |
| 1484 | init_secondary_reloc_section backend function, if defined, when a |
| 1485 | second reloc section is encountered. |
| 1486 | (swap_out_syms): Invoke the new symbol_section_index function, if |
| 1487 | defined, when computing the section index of an OS/PROC specific |
| 1488 | symbol. |
| 1489 | (_bfd_elf_init_secondary_reloc_section): New function. |
| 1490 | (_bfd_elf_slurp_secondary_reloc_section): New function. |
| 1491 | (_bfd_elf_write_secondary_reloc_section): New function. |
| 1492 | (_bfd_elf_copy_special_section_fields): New function. |
| 1493 | * elfcode.h (elf_write_relocs): Invoke the new |
| 1494 | write_secondary_relocs function, if defined, in order to emit |
| 1495 | secondary relocs. |
| 1496 | (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs |
| 1497 | function, if defined, in order to read in secondary relocs. |
| 1498 | * elfxx-target.h (elf_backend_copy_special_section_fields): |
| 1499 | Provide a non-NULL default definition. |
| 1500 | (elf_backend_init_secondary_reloc_section): Likewise. |
| 1501 | (elf_backend_slurp_secondary_reloc_section): Likewise. |
| 1502 | (elf_backend_write_secondary_reloc_section): Likewise. |
| 1503 | (struct elf_backend_data elfNN_bed): Add initialisers for the new |
| 1504 | fields. |
| 1505 | * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo |
| 1506 | * configure: Regenerate. |
| 1507 | |
| 1508 | 2020-03-05 Alan Modra <amodra@gmail.com> |
| 1509 | |
| 1510 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size |
| 1511 | against file size before allocating memory. Use bfd_alloc rather |
| 1512 | than bfd_zalloc for carsym/strings memory. |
| 1513 | |
| 1514 | 2020-03-04 Alan Modra <amodra@gmail.com> |
| 1515 | |
| 1516 | * elf.c (elf_fake_sections): Ensure sh_addralign is such that |
| 1517 | sh_addr mod sh_addalign is zero. |
| 1518 | |
| 1519 | 2020-03-04 Alan Modra <amodra@gmail.com> |
| 1520 | |
| 1521 | * format.c (bfd_check_format_matches): Call cleanup on error exit. |
| 1522 | |
| 1523 | 2020-03-03 Alan Modra <amodra@gmail.com> |
| 1524 | |
| 1525 | * format.c (struct bfd_preserve): Add cleanup field. |
| 1526 | (bfd_preserve_save): Add cleanup param and save. |
| 1527 | (bfd_preserve_restore): Return cleanup. |
| 1528 | (bfd_preserve_finish): Call the cleanup for the discarded match. |
| 1529 | (bfd_check_format_matches): Pass cleanup to bfd_preserve_save, |
| 1530 | and clear when preserving a match. Restore cleanup too when |
| 1531 | restoring that match. |
| 1532 | |
| 1533 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1534 | |
| 1535 | * cisco-core.c (cisco_core_file_p): Return bfd_cleanup. |
| 1536 | * hpux-core.c (hpux_core_core_file_p): Update prototype. |
| 1537 | * sco5-core.c (sco5_core_file_p): Return bfd_cleanup. |
| 1538 | (core_sco5_vec): Correct initialisers. |
| 1539 | |
| 1540 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1541 | |
| 1542 | * aix386-core.c (aix386_core_file_p): Return bfd_cleanup. |
| 1543 | * aix5ppc-core.c (xcoff64_core_p): Likewise. |
| 1544 | * cisco-core.c (cisco_core_file_validate): Likewise. |
| 1545 | * hppabsd-core.c (hppabsd_core_core_file_p): Likewise. |
| 1546 | * hpux-core.c (hpux_core_core_file_p): Likewise. |
| 1547 | * irix-core.c (irix_core_core_file_p): Likewise. |
| 1548 | * lynx-core.c (lynx_core_file_p): Likewise. |
| 1549 | * netbsd-core.c (netbsd_core_file_p): Likewise. |
| 1550 | * osf-core.c (osf_core_core_file_p): Likewise. |
| 1551 | * ptrace-core.c (ptrace_unix_core_file_p): Likewise. |
| 1552 | * sco5-core.c (sco5_core_file_p): Likewise. |
| 1553 | |
| 1554 | 2020-03-02 H.J. Lu <hongjiu.lu@intel.com> |
| 1555 | |
| 1556 | * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup. |
| 1557 | |
| 1558 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1559 | |
| 1560 | * targets.c (bfd_cleanup): New typedef. |
| 1561 | (struct bfd <_bfd_check_format>): Return a bfd_cleanup. |
| 1562 | * libbfd-in.h (_bfd_no_cleanup): Define. |
| 1563 | * format.c (bfd_reinit): Add cleanup parameter, call it. |
| 1564 | (bfd_check_format_matches): Set cleanup from _bfd_check_format |
| 1565 | call and pass to bfd_reinit. Delete temp, use abfd->xvec instead. |
| 1566 | * aout-target.h (callback, object_p): Return bfd_cleanup. |
| 1567 | * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise. |
| 1568 | * archive.c (bfd_generic_archive_p): Likewise. |
| 1569 | * binary.c (binary_object_p): Likewise. |
| 1570 | * coff-alpha.c (alpha_ecoff_object_p): Likewise. |
| 1571 | * coff-ia64.c (ia64coff_object_p): Likewise. |
| 1572 | * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise. |
| 1573 | * coff-sh.c (coff_small_object_p): Likewise. |
| 1574 | * coff-stgo32.c (go32_check_format): Likewise. |
| 1575 | * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p), |
| 1576 | (xcoff64_core_p): Likewise. |
| 1577 | * coffgen.c (coff_real_object_p, coff_object_p): Likewise. |
| 1578 | * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p), |
| 1579 | (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise. |
| 1580 | * elfcode.h (elf_object_p): Likewise. |
| 1581 | * elfcore.h (elf_core_file_p): Likewise. |
| 1582 | * i386msdos.c (msdos_object_p): Likewise. |
| 1583 | * ihex.c (ihex_object_p): Likewise. |
| 1584 | * libaout.h (some_aout_object_p): Likewise. |
| 1585 | * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target), |
| 1586 | (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise. |
| 1587 | * libbfd.c (_bfd_dummy_target): Likewise. |
| 1588 | * libcoff-in.h (coff_object_p): Likewise. |
| 1589 | * mach-o-aarch64.c (bfd_mach_o_arm64_object_p), |
| 1590 | (bfd_mach_o_arm64_core_p): Likewise. |
| 1591 | * mach-o-arm.c (bfd_mach_o_arm_object_p), |
| 1592 | (bfd_mach_o_arm_core_p): Likewise. |
| 1593 | * mach-o-i386.c (bfd_mach_o_i386_object_p), |
| 1594 | (bfd_mach_o_i386_core_p): Likewise. |
| 1595 | * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p), |
| 1596 | (bfd_mach_o_x86_64_core_p): Likewise. |
| 1597 | * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p), |
| 1598 | (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise. |
| 1599 | * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p), |
| 1600 | (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise. |
| 1601 | * mmo.c (mmo_object_p): Likewise. |
| 1602 | * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise. |
| 1603 | * peicode.h (coff_real_object_p, pe_ILF_object_p), |
| 1604 | (pe_bfd_object_p): Likewise. |
| 1605 | * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise. |
| 1606 | * ppcboot.c (ppcboot_object_p): Likewise. |
| 1607 | * rs6000-core.c (rs6000coff_core_p): Likewise. |
| 1608 | * som.c (som_object_setup, som_object_p): Likewise. |
| 1609 | * srec.c (srec_object_p, symbolsrec_object_p): Likewise. |
| 1610 | * tekhex.c (tekhex_object_p): Likewise. |
| 1611 | * vms-alpha.c (alpha_vms_object_p): Likewise. |
| 1612 | * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p), |
| 1613 | (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise. |
| 1614 | * wasm-module.c (wasm_object_p): Likewise. |
| 1615 | * xsym.c (bfd_sym_object_p): Likewise. |
| 1616 | * xsym.h (bfd_sym_object_p): Likewise. |
| 1617 | * aoutx.h (some_aout_object_p): Likewise, and callback parameter |
| 1618 | return type. |
| 1619 | * pdp11.c (some_aout_object_p): Likewise. |
| 1620 | * plugin.c (register_ld_plugin_object_p): Update object_p |
| 1621 | parameter type. |
| 1622 | * plugin.h (register_ld_plugin_object_p): Likewise. |
| 1623 | * bfd-in2.h: Regenerate. |
| 1624 | * libbfd.h: Regenerate. |
| 1625 | * libcoff.h: Regenerate. |
| 1626 | |
| 1627 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1628 | |
| 1629 | * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to |
| 1630 | applicable section flags. |
| 1631 | * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise. |
| 1632 | (mips_ecoff_bele_vec): Likewise. |
| 1633 | * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata |
| 1634 | and .sbss sections. |
| 1635 | * ecoff.c (_bfd_ecoff_new_section_hook): Likewise. |
| 1636 | (_bfd_ecoff_styp_to_sec_flags): Likewise. |
| 1637 | |
| 1638 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1639 | |
| 1640 | * elf32-m32r.c (m32r_elf_section_flags): New function. |
| 1641 | (elf_backend_section_flags): Define. |
| 1642 | * elf32-nds32.c (nds32_elf_section_flags): New function. |
| 1643 | (elf_backend_section_flags): Define. |
| 1644 | * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for |
| 1645 | .sbss and .sdata sections. |
| 1646 | * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA |
| 1647 | for SHF_V850_GPREL sections. |
| 1648 | * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated |
| 1649 | FIXME. |
| 1650 | * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA |
| 1651 | for SHF_PARISC_SHORT sections. |
| 1652 | * elf64-ppc.c (ppc64_elf_section_flags): New function. |
| 1653 | (elf_backend_section_flags): Define. |
| 1654 | * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA |
| 1655 | for SHF_MIPS_GPREL sections. Delete FIXME. |
| 1656 | |
| 1657 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1658 | |
| 1659 | * elf-bfd.h (elf_backend_section_flags): Remove flagword* param. |
| 1660 | * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before |
| 1661 | calling elf_backend_section_flags with adjusted params. Use |
| 1662 | newsect->flags past that point. |
| 1663 | (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for |
| 1664 | special sections. |
| 1665 | (_bfd_elf_init_private_section_data): Allow normal sh_type sections |
| 1666 | to have their type overridden, and all sh_flags but processor and |
| 1667 | os specific. |
| 1668 | * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params. |
| 1669 | * elf32-mep.c (mep_elf_section_flags): Likewise. |
| 1670 | * elf32-nios2.c (nios2_elf32_section_flags): Likewise. |
| 1671 | * elf64-alpha.c (elf64_alpha_section_flags): Likewise. |
| 1672 | * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise. |
| 1673 | * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise. |
| 1674 | * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker |
| 1675 | stub BFD and non-aarch64 input files when scanning for stubs. |
| 1676 | |
| 1677 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1678 | |
| 1679 | * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper |
| 1680 | limit to decompressed element size. |
| 1681 | |
| 1682 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1683 | |
| 1684 | * vms-lib.c (vms_traverse_index): Add recur_count param and |
| 1685 | update calls. Fail on excessive recursion. |
| 1686 | |
| 1687 | 2020-03-02 Alan Modra <amodra@gmail.com> |
| 1688 | |
| 1689 | * vms-alpha.c (vms_get_remaining_object_record): Use |
| 1690 | bfd_realloc_or_free rather than bfd_realloc. |
| 1691 | (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise. |
| 1692 | (dst_define_location, parse_module): Likewise, and check realloc |
| 1693 | return status before using memory. Return status from function |
| 1694 | adjusting all callers. |
| 1695 | |
| 1696 | 2020-02-28 Alan Modra <amodra@gmail.com> |
| 1697 | |
| 1698 | * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths. |
| 1699 | |
| 1700 | 2020-02-28 Alan Modra <amodra@gmail.com> |
| 1701 | |
| 1702 | * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read. |
| 1703 | Remove duplicate undersize check. |
| 1704 | |
| 1705 | 2020-02-27 Alan Modra <amodra@gmail.com> |
| 1706 | |
| 1707 | PR 24511 |
| 1708 | * mmo.c (mmo_scan): Set SEC_DATA for .data. |
| 1709 | |
| 1710 | 2020-02-27 Alan Modra <amodra@gmail.com> |
| 1711 | |
| 1712 | PR 24511 |
| 1713 | * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries. |
| 1714 | (coff_section_type): Adjust comment. |
| 1715 | (decode_section_type): Likewise. Call coff_section_type before |
| 1716 | decode_section_type. |
| 1717 | (bfd_decode_symclass): Use 'c' for common sections other than |
| 1718 | the standard one. |
| 1719 | |
| 1720 | 2020-02-27 Alan Modra <amodra@gmail.com> |
| 1721 | |
| 1722 | * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one |
| 1723 | malloc'd block. |
| 1724 | |
| 1725 | 2020-02-27 Alan Modra <amodra@gmail.com> |
| 1726 | |
| 1727 | * bfd.c (bfd_stat_arch_elt): Use vector of containing archive, |
| 1728 | if file is an archive element. |
| 1729 | * bfd-in2.h: Regenerate. |
| 1730 | |
| 1731 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1732 | |
| 1733 | * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and |
| 1734 | bfd_set_error on failing test. Don't bother changing bfd_error on |
| 1735 | file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE. |
| 1736 | Check sym name is within string buffer. Use size_t for some vars. |
| 1737 | (do_slurp_coff_armap): Use size_t for some variables, fix size of |
| 1738 | int_buf. Don't change bfd_error on file read error. Use |
| 1739 | _bfd_mul_overflow when calculating carsym buffer size. Reorder |
| 1740 | calculations to catch overflows before they occur. malloc and |
| 1741 | free raw armap rather than using bfd_alloc. Read raw armap before |
| 1742 | allocating carsym+strings buffer. |
| 1743 | (_bfd_slurp_extended_name_table): Localize variables. Check |
| 1744 | name size against file size. |
| 1745 | |
| 1746 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1747 | |
| 1748 | * vms-lib.c (vms_lib_read_index): Release correct buffer. |
| 1749 | |
| 1750 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1751 | |
| 1752 | * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than |
| 1753 | malloc. Check for NULL return from bfd_malloc. |
| 1754 | (rx_table_find, rx_table_map): Likewise. |
| 1755 | (rx_set_section_contents): Check bfd_alloc return. |
| 1756 | (rx_dump_symtab): Don't alloc internal_syms or external_syms. |
| 1757 | |
| 1758 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1759 | |
| 1760 | * aoutx.h: Indent labels correctly. Format error strings. |
| 1761 | * archive.c: Likewise. |
| 1762 | * archive64.c: Likewise. |
| 1763 | * coff-arm.c: Likewise. |
| 1764 | * coff-rs6000.c: Likewise. |
| 1765 | * coff-stgo32.c: Likewise. |
| 1766 | * cpu-arm.c: Likewise. |
| 1767 | * dwarf2.c: Likewise. |
| 1768 | * elf-ifunc.c: Likewise. |
| 1769 | * elf-properties.c: Likewise. |
| 1770 | * elf-s390-common.c: Likewise. |
| 1771 | * elf-strtab.c: Likewise. |
| 1772 | * elf.c: Likewise. |
| 1773 | * elf32-arm.c: Likewise. |
| 1774 | * elf32-bfin.c: Likewise. |
| 1775 | * elf32-cr16.c: Likewise. |
| 1776 | * elf32-csky.c: Likewise. |
| 1777 | * elf32-i386.c: Likewise. |
| 1778 | * elf32-m68k.c: Likewise. |
| 1779 | * elf32-msp430.c: Likewise. |
| 1780 | * elf32-nds32.c: Likewise. |
| 1781 | * elf32-nios2.c: Likewise. |
| 1782 | * elf32-pru.c: Likewise. |
| 1783 | * elf32-xtensa.c: Likewise. |
| 1784 | * elf64-ia64-vms.c: Likewise. |
| 1785 | * elf64-x86-64.c: Likewise. |
| 1786 | * elfcode.h: Likewise. |
| 1787 | * elfcore.h: Likewise. |
| 1788 | * elflink.c: Likewise. |
| 1789 | * elfnn-aarch64.c: Likewise. |
| 1790 | * elfnn-ia64.c: Likewise. |
| 1791 | * elfnn-riscv.c: Likewise. |
| 1792 | * elfxx-mips.c: Likewise. |
| 1793 | * elfxx-sparc.c: Likewise. |
| 1794 | * elfxx-x86.c: Likewise. |
| 1795 | * i386lynx.c: Likewise. |
| 1796 | * merge.c: Likewise. |
| 1797 | * pdp11.c: Likewise. |
| 1798 | * plugin.c: Likewise. |
| 1799 | * reloc.c: Likewise. |
| 1800 | |
| 1801 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1802 | |
| 1803 | PR 25593 |
| 1804 | * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to |
| 1805 | "dyn_loaded". |
| 1806 | (bfd_elf_add_dt_needed_tag): Declare. |
| 1807 | * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf. |
| 1808 | * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename |
| 1809 | from elf_add_dt_needed_tag. Remove soname and doit param. |
| 1810 | (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag |
| 1811 | to see whether as-needed lib is already loaded, use dyn_loaded |
| 1812 | list instead. When saving and restoring around as-needed lib |
| 1813 | handle possibility that dynstr has not been initialised. Don't |
| 1814 | add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs. |
| 1815 | Mark libs loaded via DT_NEEDED entries of other libs with |
| 1816 | DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of |
| 1817 | the output. |
| 1818 | (elf_link_check_versioned_symbol): Remove now unneccesary |
| 1819 | DYNAMIC check when traversing dyn_loaded list. |
| 1820 | |
| 1821 | 2020-02-26 Alan Modra <amodra@gmail.com> |
| 1822 | |
| 1823 | * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes. |
| 1824 | |
| 1825 | 2020-02-25 H.J. Lu <hongjiu.lu@intel.com> |
| 1826 | |
| 1827 | PR binutils/25584 |
| 1828 | * plugin.c (need_lto_wrapper_p): New. |
| 1829 | (bfd_plugin_set_program_name): Add an int argument to set |
| 1830 | need_lto_wrapper_p. |
| 1831 | (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't |
| 1832 | set. |
| 1833 | * plugin.h (bfd_plugin_set_program_name): Add an int argument. |
| 1834 | |
| 1835 | 2020-02-24 Alan Modra <amodra@gmail.com> |
| 1836 | |
| 1837 | * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks. |
| 1838 | |
| 1839 | 2020-02-24 Alan Modra <amodra@gmail.com> |
| 1840 | |
| 1841 | * vms-lib.c (struct carsym_mem): Add limit. |
| 1842 | (vms_add_index): Heed limit. |
| 1843 | (vms_traverse_index): Catch buffer overflows. Remove outdated fixme. |
| 1844 | (vms_lib_read_index): Set up limit. Catch 32-bit overflow. |
| 1845 | Always return actual number read. |
| 1846 | (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace |
| 1847 | assertion with error exit. |
| 1848 | |
| 1849 | 2020-02-22 Alan Modra <amodra@gmail.com> |
| 1850 | |
| 1851 | PR 25585 |
| 1852 | * elf.c (assign_file_positions_for_load_sections): Continue linking |
| 1853 | on "PHDR segment not covered by LOAD segment" errors. |
| 1854 | |
| 1855 | 2020-02-21 Alan Modra <amodra@gmail.com> |
| 1856 | |
| 1857 | * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective |
| 1858 | overflow check. |
| 1859 | (bfd_mach_o_canonicalize_reloc): Likewise. |
| 1860 | (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check |
| 1861 | counts and offsets against file size. |
| 1862 | (bfd_mach_o_build_dysymtab): Fix ineffective overflow check. |
| 1863 | (bfd_mach_o_mangle_sections): Remove unnecessary overflow check. |
| 1864 | (bfd_mach_o_read_symtab_symbols): Sanity check count and offset |
| 1865 | against file size. Delete symbol table error message. |
| 1866 | (bfd_mach_o_read_dysymtab): Sanity check counts and offsets |
| 1867 | against file size. |
| 1868 | (bfd_mach_o_read_symtab): Likewise. |
| 1869 | (bfd_mach_o_read_command): Pass file size. |
| 1870 | (bfd_mach_o_scan): Sanity check command count against file size. |
| 1871 | |
| 1872 | 2020-02-21 Alan Modra <amodra@gmail.com> |
| 1873 | |
| 1874 | PR 25569 |
| 1875 | * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use |
| 1876 | "text", "data" and "bss" section pointer vars. Don't update |
| 1877 | section size, just exec header sizes. |
| 1878 | (adjust_sizes_and_vmas): Don't update text section size. Set |
| 1879 | initial exec header a_text. Print exec headers sizes. |
| 1880 | * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic), |
| 1881 | (adjust_sizes_and_vmas): Similarly. Formatting. |
| 1882 | (final_link): Correct final file extension. |
| 1883 | |
| 1884 | 2020-02-20 Nick Clifton <nickc@redhat.com> |
| 1885 | |
| 1886 | * elf-bfd.h (struct elf_backend_data): Add symbol_section_index |
| 1887 | callback. |
| 1888 | * elfxx-target.h (elf_backend_symbol_section_index): Provide |
| 1889 | default definition. |
| 1890 | (elfNN_bed): Initialise the symbol_section_index field. |
| 1891 | * elf.c (swap_out_syms): Call symbol_section_index, if defined, on |
| 1892 | OS and PROC specific section indicies. Warn if converting other |
| 1893 | reserved incidies to SHN_ABS. |
| 1894 | |
| 1895 | 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com> |
| 1896 | |
| 1897 | PR 25537 |
| 1898 | * cpu-z80.c: Add machine type compatibility checking. |
| 1899 | |
| 1900 | 2020-02-19 H.J. Lu <hongjiu.lu@intel.com> |
| 1901 | |
| 1902 | PR binutils/25355 |
| 1903 | * plugin.c (plugin_list_entry): Remove handle. |
| 1904 | (try_load_plugin): Call dlclose before return. |
| 1905 | |
| 1906 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 1907 | |
| 1908 | * libbfd-in.h (_bfd_constant_p): Define. |
| 1909 | (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against |
| 1910 | file size before allocating memory. |
| 1911 | * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check. |
| 1912 | * elf.c (bfd_elf_get_str_section): Likewise. |
| 1913 | (_bfd_elf_slurp_version_tables): Likewise. |
| 1914 | * libbfd.h: Regenerate. |
| 1915 | |
| 1916 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 1917 | |
| 1918 | * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New. |
| 1919 | * aoutx.h (aout_get_external_symbols): Replace calls to |
| 1920 | bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read. |
| 1921 | (slurp_reloc_table): Likewise. |
| 1922 | * archive.c (do_slurp_bsd_armap): Likewise. |
| 1923 | (do_slurp_coff_armap): Likewise. |
| 1924 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise. |
| 1925 | * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise. |
| 1926 | * coff64-rs6000.c (xcoff64_slurp_armap): Likewise. |
| 1927 | * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise. |
| 1928 | * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section), |
| 1929 | (_bfd_coff_get_external_symbols): Likewise. |
| 1930 | * ecoff.c (ecoff_slurp_symbolic_header), |
| 1931 | (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table), |
| 1932 | (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ), |
| 1933 | (ecoff_indirect_link_order): Likewise. |
| 1934 | * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes), |
| 1935 | (_bfd_elf_slurp_version_tables): Likewise. |
| 1936 | * elf32-m32c.c (m32c_elf_relax_section): Likewise. |
| 1937 | * elf32-rl78.c (rl78_elf_relax_section): Likewise. |
| 1938 | * elf32-rx.c (elf32_rx_relax_section): Likewise. |
| 1939 | * elf64-alpha.c (READ): Likewise. |
| 1940 | * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise. |
| 1941 | * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. |
| 1942 | * elfcode.h (elf_slurp_symbol_table), |
| 1943 | (elf_slurp_reloc_table_from_section): Likewise. |
| 1944 | * elflink.c (elf_link_add_object_symbols), |
| 1945 | (elf_link_check_versioned_symbol): Likewise. |
| 1946 | * elfxx-mips.c (READ): Likewise. |
| 1947 | * i386lynx.c (slurp_reloc_table): Likewise. |
| 1948 | * lynx-core.c (lynx_core_file_p): Likewise. |
| 1949 | * mach-o.c (bfd_mach_o_canonicalize_relocs), |
| 1950 | (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read), |
| 1951 | (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content |
| 1952 | * pdp11.c (aout_get_external_symbols, slurp_reloc_table |
| 1953 | * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address), |
| 1954 | (bfd_pef_parse_symbols): Likewise. |
| 1955 | * peicode.h (pe_ILF_object_p, pe_bfd_object_p |
| 1956 | * som.c (setup_sections, som_slurp_string_table), |
| 1957 | (som_slurp_reloc_table, som_bfd_count_ar_symbols), |
| 1958 | (som_bfd_fill_in_ar_symbols): Likewise. |
| 1959 | * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst), |
| 1960 | (evax_bfd_print_image): Likewise. |
| 1961 | * vms-lib.c (_bfd_vms_lib_archive_p): Likewise. |
| 1962 | * wasm-module.c (wasm_scan): Likewise. |
| 1963 | * xcofflink.c (xcoff_link_add_symbols): Likewise. |
| 1964 | * xsym.c (bfd_sym_read_name_table), |
| 1965 | (bfd_sym_print_type_information_table_entry): Likewise. |
| 1966 | * libbfd.h: Regenerate. |
| 1967 | |
| 1968 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 1969 | |
| 1970 | * aoutx.h (slurp_reloc_table): Allocate reloc_cache after |
| 1971 | reading external relocs. |
| 1972 | * ecoff.c (ecoff_slurp_reloc_table): Likewise. |
| 1973 | * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error |
| 1974 | after bfd_bread. |
| 1975 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary |
| 1976 | bfd_release. |
| 1977 | * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*. |
| 1978 | (m32c_elf_relax_section): Likewise. |
| 1979 | * elf32-rl78.c (rl78_offset_for_reloc): Likewise. |
| 1980 | (rl78_elf_relax_section): Likewise. |
| 1981 | * elf32-rx.c (rx_offset_for_reloc): Likewise. |
| 1982 | (elf32_rx_relax_section): Likewise. |
| 1983 | * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better |
| 1984 | parameter types and use.. |
| 1985 | (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib), |
| 1986 | (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions. |
| 1987 | * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr |
| 1988 | being read from file, just the extra. |
| 1989 | * som.c (som_slurp_symbol_table): Allocate internal symbol buffer |
| 1990 | after reading external syms. Free on failure. |
| 1991 | |
| 1992 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 1993 | |
| 1994 | * coffcode.h (buy_and_read, coff_slurp_line_table), |
| 1995 | (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace |
| 1996 | bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the |
| 1997 | corresponding bfd_alloc call. Adjust variables to suit. |
| 1998 | * coffgen.c (_bfd_coff_get_external_symbols): Likewise. |
| 1999 | * ecoff.c (_bfd_ecoff_slurp_symbolic_info), |
| 2000 | (_bfd_ecoff_slurp_symbol_table, READ): Likewise. |
| 2001 | * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr), |
| 2002 | (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise. |
| 2003 | * elf32-m32c.c (m32c_elf_relax_section): Likewise. |
| 2004 | * elf32-rl78.c (rl78_elf_relax_section): Likewise. |
| 2005 | * elf32-rx.c (elf32_rx_relax_section): Likewise. |
| 2006 | * elf64-alpha.c (READ): Likewise. |
| 2007 | * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr), |
| 2008 | (elf_slurp_symbol_table, elf_slurp_reloc_table), |
| 2009 | (bfd_from_remote_memory): Likewise. |
| 2010 | * elfcore.h (core_find_build_id): Likewise. |
| 2011 | * elfxx-mips.c (READ): Likewise. |
| 2012 | * mach-o.c (bfd_mach_o_mangle_sections), |
| 2013 | (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread), |
| 2014 | (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections), |
| 2015 | (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise. |
| 2016 | * som.c (setup_sections, som_prep_for_fixups) |
| 2017 | (som_build_and_write_symbol_table, som_slurp_symbol_table), |
| 2018 | (som_slurp_reloc_table, som_bfd_count_ar_symbols), |
| 2019 | (som_bfd_fill_in_ar_symbols, som_slurp_armap), |
| 2020 | (som_bfd_ar_write_symbol_stuff): Likewise. |
| 2021 | * vms-alpha.c (vector_grow1): Likewise. |
| 2022 | * vms-lib.c (vms_add_index): Likewise. |
| 2023 | * wasm-module.c (wasm_scan_name_function_section): Likewise. |
| 2024 | * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete. |
| 2025 | * opncls.c (bfd_alloc2, bfd_zalloc2): Delete. |
| 2026 | * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2), |
| 2027 | (bfd_alloc2, bfd_zalloc2): Delete. |
| 2028 | (_bfd_mul_overflow): Define. |
| 2029 | * libbfd.h: Regenerate. |
| 2030 | |
| 2031 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2032 | |
| 2033 | * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than |
| 2034 | bfd_zalloc2. |
| 2035 | (assign_section_numbers): Likewise. |
| 2036 | (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2. |
| 2037 | (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than |
| 2038 | bfd_malloc2, size_t amt, and unsigned tls_count. |
| 2039 | (rewrite_elf_program_header): Use bfd_malloc and size_t amt. |
| 2040 | * elflink.c (elf_create_symbuf): Use bfd_malloc. |
| 2041 | (elf_output_implib): Use bfd_alloc. |
| 2042 | |
| 2043 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2044 | |
| 2045 | * bfd.c (struct bfd): Move format and direction to other |
| 2046 | bitfields. Add "size". |
| 2047 | * bfdio.c (bfd_get_size): Cache size when not writing file. |
| 2048 | * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size |
| 2049 | returning zero, ie. unknown. |
| 2050 | (bfd_get_alt_debug_link_info): Likewise. |
| 2051 | * bfd-in2.h: Regenerate. |
| 2052 | |
| 2053 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2054 | |
| 2055 | * coffgen.c (_bfd_coff_get_external_symbols): Don't call |
| 2056 | bfd_get_file_size twice. |
| 2057 | (_bfd_coff_read_string_table): Allow for bfd_get_file_size |
| 2058 | zero, ie. unknown, return. |
| 2059 | * elf-attrs.c (_bfd_elf_parse_attributes): Likewise. |
| 2060 | * elfcode.h (elf_swap_shdr_in): Likewise. |
| 2061 | (elf_object_p): Don't call bfd_get_file_size twice and correct |
| 2062 | file size check. |
| 2063 | |
| 2064 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2065 | |
| 2066 | * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean, |
| 2067 | FALSE if memory alloc fails. Adjust calls. |
| 2068 | * som.c (som_prep_for_fixups): Likewise. |
| 2069 | * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca), |
| 2070 | (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr), |
| 2071 | (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise. |
| 2072 | * som.c (som_build_and_write_symbol_table): Return via error_return |
| 2073 | on seek failure. |
| 2074 | * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes. |
| 2075 | (VEC_APPEND_EL): Delete. |
| 2076 | (vector_grow1): Return pointer to element. Catch overflow. |
| 2077 | Return NULL on memory allocation failure. |
| 2078 | (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND. |
| 2079 | (alpha_vms_add_fixup_ca): Likewise. |
| 2080 | (alpha_vms_link_add_object_symbols): Check VEC_APPEND result |
| 2081 | before using. |
| 2082 | * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result. |
| 2083 | |
| 2084 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2085 | |
| 2086 | * aix386-core.c (aix386_core_file_p): Use size_t for "amt". |
| 2087 | * aout-target.h (object_p): Likewise. |
| 2088 | * aout-tic30.c (tic30_aout_object_p): Likewise. |
| 2089 | * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol), |
| 2090 | (emit_stringtab, write_syms, link_hash_table_create), |
| 2091 | (aout_link_write_other_symbol): Likewise. |
| 2092 | * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p), |
| 2093 | (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents), |
| 2094 | (_bfd_compute_and_write_armap): Likewise. |
| 2095 | * archures.c (bfd_arch_list): Likewise. |
| 2096 | * bfd.c (bfd_record_phdr): Likewise. |
| 2097 | * binary.c (binary_canonicalize_symtab): Likewise. |
| 2098 | * cisco-core.c (cisco_core_file_validate): Likewise. |
| 2099 | * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue), |
| 2100 | (find_arm_glue, record_arm_to_thumb_glue), |
| 2101 | (record_thumb_to_arm_glue): Likewise. |
| 2102 | * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc), |
| 2103 | (ppc_allocate_toc_section): Likewise. |
| 2104 | * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise. |
| 2105 | * coff-sh.c (sh_relax_section): Likewise. |
| 2106 | * coff64-rs6000.c (xcoff64_archive_p): Likewise. |
| 2107 | * coffcode.h (handle_COMDAT, coff_new_section_hook), |
| 2108 | (coff_set_alignment_hook, coff_mkobject), |
| 2109 | (coff_compute_section_file_positions): Likewise. |
| 2110 | * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol), |
| 2111 | (coff_find_nearest_line_with_names), |
| 2112 | ( bfd_coff_set_symbol_class): Likewise. |
| 2113 | * cofflink.c (_bfd_coff_link_hash_table_create), |
| 2114 | (_bfd_coff_link_input_bfd): Likewise. |
| 2115 | * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise. |
| 2116 | * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info), |
| 2117 | (build_line_info_table, sort_line_sequences), |
| 2118 | (line_info_add_include_dir, line_info_add_file_name), |
| 2119 | (decode_line_info, scan_unit_for_symbols, parse_comp_unit), |
| 2120 | (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise. |
| 2121 | * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol), |
| 2122 | (_bfd_ecoff_find_nearest_line), |
| 2123 | (_bfd_ecoff_bfd_link_hash_table_create): Likewise. |
| 2124 | * ecofflink.c (bfd_ecoff_debug_init): Likewise. |
| 2125 | * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise. |
| 2126 | * elf-m10300.c (mn10300_elf_relax_section), |
| 2127 | (elf32_mn10300_link_hash_table_create): Likewise. |
| 2128 | * elf-strtab.c (_bfd_elf_strtab_init): Likewise. |
| 2129 | * elf.c (make_mapping, copy_elf_program_header): Likewise. |
| 2130 | * elf32-arm.c (elf32_arm_link_hash_table_create), |
| 2131 | (elf32_arm_setup_section_lists, elf32_arm_check_relocs), |
| 2132 | (elf32_arm_new_section_hook): Likewise. |
| 2133 | * elf32-avr.c (elf_avr_new_section_hook), |
| 2134 | (elf32_avr_link_hash_table_create, get_local_syms), |
| 2135 | (elf32_avr_setup_section_lists): Likewise. |
| 2136 | * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create), |
| 2137 | (bfin_link_hash_table_create): Likewise. |
| 2138 | * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. |
| 2139 | * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. |
| 2140 | * elf32-csky.c (csky_elf_link_hash_table_create), |
| 2141 | (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise. |
| 2142 | * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise. |
| 2143 | * elf32-hppa.c (elf32_hppa_link_hash_table_create), |
| 2144 | (elf32_hppa_setup_section_lists, get_local_syms): Likewise. |
| 2145 | * elf32-i386.c (elf_i386_check_relocs): Likewise. |
| 2146 | * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. |
| 2147 | * elf32-m32r.c (m32r_elf_link_hash_table_create), |
| 2148 | (m32r_elf_check_relocs): Likewise. |
| 2149 | * elf32-m68hc1x.c (m68hc11_elf_hash_table_create), |
| 2150 | (elf32_m68hc11_setup_section_lists), |
| 2151 | (elf32_m68hc11_size_stubs): Likewise. |
| 2152 | * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. |
| 2153 | * elf32-metag.c (elf_metag_link_hash_table_create), |
| 2154 | (elf_metag_setup_section_lists): Likewise. |
| 2155 | * elf32-microblaze.c (microblaze_elf_link_hash_table_create), |
| 2156 | (microblaze_elf_check_relocs): Likewise. |
| 2157 | * elf32-nds32.c (nds32_elf_link_hash_table_create), |
| 2158 | (nds32_elf_check_relocs): Likewise. |
| 2159 | * elf32-nios2.c (nios2_elf32_setup_section_lists), |
| 2160 | (get_local_syms, nios2_elf32_check_relocs), |
| 2161 | (nios2_elf32_link_hash_table_create): Likewise. |
| 2162 | * elf32-or1k.c (or1k_elf_link_hash_table_create), |
| 2163 | (or1k_elf_check_relocs): Likewise. |
| 2164 | * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise. |
| 2165 | * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise. |
| 2166 | * elf32-s390.c (elf_s390_link_hash_table_create), |
| 2167 | (elf_s390_check_relocs): Likewise. |
| 2168 | * elf32-score.c (score_elf_create_got_section), |
| 2169 | (s3_elf32_score_new_section_hook), |
| 2170 | (elf32_score_link_hash_table_create): Likewise. |
| 2171 | * elf32-score7.c (score_elf_create_got_section), |
| 2172 | (s7_elf32_score_new_section_hook): Likewise. |
| 2173 | * elf32-sh.c (sh_elf_link_hash_table_create), |
| 2174 | (sh_elf_check_relocs): Likewise. |
| 2175 | * elf32-tic6x.c (elf32_tic6x_link_hash_table_create), |
| 2176 | (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise. |
| 2177 | * elf32-tilepro.c (tilepro_elf_link_hash_table_create), |
| 2178 | (tilepro_elf_check_relocs): Likewise. |
| 2179 | * elf32-v850.c (remember_hi16s_reloc): Likewise. |
| 2180 | * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. |
| 2181 | * elf32-xtensa.c (elf_xtensa_link_hash_table_create), |
| 2182 | (elf_xtensa_new_section_hook): Likewise. |
| 2183 | * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create), |
| 2184 | (get_got_entry, elf64_alpha_check_relocs): Likewise. |
| 2185 | * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise. |
| 2186 | * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise. |
| 2187 | * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. |
| 2188 | * elf64-ppc.c (ppc64_elf_new_section_hook), |
| 2189 | (ppc64_elf_link_hash_table_create, update_local_sym_info), |
| 2190 | (update_plt_info, ppc64_elf_check_relocs): Likewise. |
| 2191 | * elf64-s390.c (elf_s390_link_hash_table_create), |
| 2192 | (elf_s390_check_relocs): Likewise. |
| 2193 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. |
| 2194 | * elflink.c (bfd_elf_link_record_local_dynamic_symbol), |
| 2195 | (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols), |
| 2196 | (elf_link_add_archive_symbols, compute_bucket_count), |
| 2197 | (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create), |
| 2198 | (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out), |
| 2199 | (bfd_elf_final_link): Likewise. |
| 2200 | * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create), |
| 2201 | (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs), |
| 2202 | (elfNN_aarch64_new_section_hook): Likewise. |
| 2203 | * elfnn-ia64.c (elfNN_ia64_object_p): Likewise. |
| 2204 | * elfnn-riscv.c (riscv_elf_link_hash_table_create), |
| 2205 | (riscv_elf_check_relocs): Likewise. |
| 2206 | * elfxx-mips.c (_bfd_mips_elf_new_section_hook), |
| 2207 | (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs), |
| 2208 | (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents), |
| 2209 | (_bfd_mips_elf_link_hash_table_create): Likewise. |
| 2210 | * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create), |
| 2211 | (_bfd_sparc_elf_check_relocs), |
| 2212 | (_bfd_sparc_elf_new_section_hook): Likewise. |
| 2213 | * elfxx-tilegx.c (tilegx_elf_link_hash_table_create), |
| 2214 | (tilegx_elf_check_relocs): Likewise. |
| 2215 | * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. |
| 2216 | * format.c (bfd_check_format_matches): Likewise. |
| 2217 | * hash.c (_bfd_stringtab_init): Likewise. |
| 2218 | * ihex.c (ihex_scan): Likewise. |
| 2219 | * irix-core.c (irix_core_core_file_p): Likewise. |
| 2220 | * linker.c (bfd_wrapped_link_hash_lookup), |
| 2221 | (_bfd_generic_link_hash_table_create), |
| 2222 | (_bfd_generic_reloc_link_order): Likewise. |
| 2223 | * lynx-core.c (lynx_core_file_p): Likewise. |
| 2224 | * netbsd-core.c (netbsd_core_file_p): Likewise. |
| 2225 | * osf-core.c (osf_core_core_file_p): Likewise. |
| 2226 | * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol), |
| 2227 | (link_hash_table_create, aout_link_write_other_symbol): Likewise. |
| 2228 | * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise. |
| 2229 | * peicode.h (pe_mkobject): Likewise. |
| 2230 | * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise. |
| 2231 | * ptrace-core.c (ptrace_unix_core_file_p): Likewise. |
| 2232 | * sco5-core.c (read_uarea): Likewise. |
| 2233 | * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers), |
| 2234 | (som_write_fixups, som_write_space_strings, som_write_symbol_strings), |
| 2235 | (som_finish_writing, som_canonicalize_symtab, som_new_section_hook), |
| 2236 | (som_bfd_copy_private_section_data, bfd_som_set_section_attributes), |
| 2237 | (bfd_som_attach_aux_hdr, som_write_armap): Likewise. |
| 2238 | * srec.c (srec_scan): Likewise. |
| 2239 | * syms.c (_bfd_generic_make_empty_symbol): Likewise. |
| 2240 | * targets.c (bfd_target_list): Likewise. |
| 2241 | * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise. |
| 2242 | * trad-core.c (trad_unix_core_file_p): Likewise. |
| 2243 | * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create), |
| 2244 | (vms_new_section_hook): Likewise. |
| 2245 | * wasm-module.c (wasm_make_empty_symbol): Likewise. |
| 2246 | * xcofflink.c (xcoff_get_section_contents), |
| 2247 | (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path), |
| 2248 | (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym), |
| 2249 | (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise. |
| 2250 | |
| 2251 | 2020-02-19 Alan Modra <amodra@gmail.com> |
| 2252 | |
| 2253 | * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99. |
| 2254 | |
| 2255 | 2020-02-13 H.J. Lu <hongjiu.lu@intel.com> |
| 2256 | |
| 2257 | * plugin.c (try_load_plugin): Make plugin_list_iter an argument |
| 2258 | and use it if it isn't NULL. Remove has_plugin_p argument. Add |
| 2259 | a build_list_p argument. Don't search plugin_list. Short circuit |
| 2260 | when building the plugin list. |
| 2261 | (has_plugin): Renamed to has_plugin_list. |
| 2262 | (bfd_plugin_set_plugin): Don't set has_plugin. |
| 2263 | (bfd_plugin_specified_p): Check plugin_list instead. |
| 2264 | (build_plugin_list): New function. |
| 2265 | (load_plugin): Call build_plugin_list and use plugin_list. |
| 2266 | |
| 2267 | 2020-02-11 H.J. Lu <hongjiu.lu@intel.com> |
| 2268 | |
| 2269 | PR binutils/25355 |
| 2270 | * plugin.c (try_claim): Always clean up for LTO wrapper. |
| 2271 | (try_load_plugin): Treat each object as independent. Create a |
| 2272 | copy for plugin name. |
| 2273 | |
| 2274 | 2020-02-11 Nick Clifton <nickc@redhat.com> |
| 2275 | |
| 2276 | * elf32-msp430.c (msp430_final_link_relocate): Always use longs |
| 2277 | for addresses in print statements. |
| 2278 | (msp430_elf_relax_delete_bytes): Likewise. |
| 2279 | (msp430_elf_relax_add_words): Likewise. |
| 2280 | (msp430_elf_relax_section): Likewise. |
| 2281 | |
| 2282 | 2020-02-11 H.J. Lu <hongjiu.lu@intel.com> |
| 2283 | |
| 2284 | * plugin.c (add_symbols): Clear plugin_data memory. |
| 2285 | |
| 2286 | 2020-02-10 H.J. Lu <hongjiu.lu@intel.com> |
| 2287 | |
| 2288 | PR binutils/25355 |
| 2289 | * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE. |
| 2290 | (EXECUTABLE_SUFFIX): Likewise. |
| 2291 | * config.in: Regenerated. |
| 2292 | * configure: Likewise. |
| 2293 | * plugin.c (bfd_plugin_close_and_cleanup): Removed. |
| 2294 | (plugin_list_entry): Add all_symbols_read, cleanup_handler, |
| 2295 | gcc, lto_wrapper, resolution_file, resolution_option, gcc_env, |
| 2296 | real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms. |
| 2297 | (get_lto_wrapper): New. |
| 2298 | (setup_lto_wrapper_env): Likewise. |
| 2299 | (current_plugin): Likewise. |
| 2300 | (register_all_symbols_read): Likewise. |
| 2301 | (register_cleanup): Likewise. |
| 2302 | (get_symbols): Likewise. |
| 2303 | (add_input_file): Likewise. |
| 2304 | (bfd_plugin_close_and_cleanup): Likewise. |
| 2305 | (claim_file): Removed. |
| 2306 | (register_claim_file): Set current_plugin->claim_file. |
| 2307 | (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and |
| 2308 | lto_syms in current_plugin. |
| 2309 | (try_claim): Use current_plugin->claim_file. Call LTO plugin |
| 2310 | all_symbols_read handler. Copy real symbols to plugin_data. |
| 2311 | Call LTO plugin cleanup handler. Clean up for LTO wrapper. |
| 2312 | (try_load_plugin): Don't reuse the previous plugin for LTO |
| 2313 | wrapper. Set up GCC LTO wrapper if possible. Don't set |
| 2314 | plugin_list_iter->claim_file. |
| 2315 | (bfd_plugin_canonicalize_symtab): Use real LTO symbols if |
| 2316 | possible. |
| 2317 | * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and |
| 2318 | real_syms. |
| 2319 | |
| 2320 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
| 2321 | |
| 2322 | * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch, |
| 2323 | check if previous instruction matches a conditional jump inserted |
| 2324 | earlier. Invert conditional jump and delete branch in this case. |
| 2325 | |
| 2326 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
| 2327 | |
| 2328 | * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to |
| 2329 | msp430_elf_relax_add_words. Support insertion of either one or two |
| 2330 | words. |
| 2331 | (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation |
| 2332 | needs to be grown. Handle insertion of branch instruction to replace |
| 2333 | jump. |
| 2334 | |
| 2335 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
| 2336 | |
| 2337 | * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for |
| 2338 | debugging relocations. |
| 2339 | (msp430_elf_relax_delete_bytes): Likewise. |
| 2340 | (msp430_elf_relax_add_two_words): Likewise. |
| 2341 | (msp430_elf_relax_section): Likewise. |
| 2342 | |
| 2343 | 2020-02-10 Alan Modra <amodra@gmail.com> |
| 2344 | |
| 2345 | * archures.c: Wrap overlong z80 comments. |
| 2346 | * bfd-in2.h: Regenerate. |
| 2347 | |
| 2348 | 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com> |
| 2349 | |
| 2350 | PR 25469 |
| 2351 | * archures.c: Add GBZ80 and Z80N machine values. |
| 2352 | * reloc.c: Add BFD_RELOC_Z80_16_BE. |
| 2353 | * coff-z80.c: Add support for new reloc. |
| 2354 | * coffcode.h: Add support for new machine values. |
| 2355 | * cpu-z80.c: Add support for new machine names. |
| 2356 | * elf32-z80.c: Add support for new reloc. |
| 2357 | * bfd-in2.h: Regenerate. |
| 2358 | * libbfd.h: Regenerate. |
| 2359 | |
| 2360 | 2020-02-07 Nick Clifton <nickc@redhat.com> |
| 2361 | |
| 2362 | PR 23932 |
| 2363 | * elf.c (rewrite_elf_program_header): Do not complain if no |
| 2364 | sections are mapped to a segment. |
| 2365 | |
| 2366 | 2020-02-06 H.J. Lu <hongjiu.lu@intel.com> |
| 2367 | |
| 2368 | PR ld/25490 |
| 2369 | * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error |
| 2370 | for garbage collection on __patchable_function_entries section |
| 2371 | without linked-to section. |
| 2372 | |
| 2373 | 2020-02-06 H.J. Lu <hongjiu.lu@intel.com> |
| 2374 | |
| 2375 | PR gas/25381 |
| 2376 | * bfd-in2.h: Regenerated. |
| 2377 | * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook |
| 2378 | on section if gc_mark of any of its linked-to sections is set |
| 2379 | and don't set gc_mark again. |
| 2380 | * section.c (asection): Add linked_to_symbol_name to map_head |
| 2381 | union. |
| 2382 | |
| 2383 | 2020-02-06 Maciej W. Rozycki <macro@wdc.com> |
| 2384 | |
| 2385 | * elf32-v850.c (v850_elf_relax_section): Fix the index used for |
| 2386 | reporting an unrecognized instruction with R_V850_LONGJUMP. |
| 2387 | |
| 2388 | 2020-02-05 Alan Modra <amodra@gmail.com> |
| 2389 | |
| 2390 | * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality. |
| 2391 | |
| 2392 | 2020-02-04 Alan Modra <amodra@gmail.com> |
| 2393 | |
| 2394 | * elf32-ppc.c (ppc_elf_relocate_section): After applying |
| 2395 | R_PPC_VLE_ADDR20, goto copy_reloc. |
| 2396 | |
| 2397 | 2020-02-02 H.J. Lu <hongjiu.lu@intel.com> |
| 2398 | |
| 2399 | * bfd-in2.h: Regenerated. |
| 2400 | * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments. |
| 2401 | |
| 2402 | 2020-02-02 H.J. Lu <hongjiu.lu@intel.com> |
| 2403 | |
| 2404 | PR gas/25380 |
| 2405 | * bfd-in2.h: Regenerated. |
| 2406 | * ecoff.c (bfd_debug_section): Add section_id. |
| 2407 | * section.c (bfd_section): Add section_id. |
| 2408 | (SEC_ASSEMBLER_SECTION_ID): New. |
| 2409 | (BFD_FAKE_SECTION): Add section_id. |
| 2410 | |
| 2411 | 2020-02-01 Nick Clifton <nickc@redhat.com> |
| 2412 | |
| 2413 | * config.bfd: Move the c30-aout and tic30-aout targets onto the |
| 2414 | obsolete list. |
| 2415 | |
| 2416 | 2020-01-31 Sandra Loosemore <sandra@codesourcery.com> |
| 2417 | |
| 2418 | * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel |
| 2419 | encodings are relative to the GOT on nios2, too. |
| 2420 | |
| 2421 | 2020-01-31 Alan Modra <amodra@gmail.com> |
| 2422 | |
| 2423 | * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp |
| 2424 | file. Use $< and $@ in rules. |
| 2425 | (elf32-aarch64.c, elf64-aarch64.c): Likewise. |
| 2426 | (elf32-ia64.c, elf64-ia64.c): Likewise. |
| 2427 | (elf32-riscv.c, elf64-riscv.c): Likewise. |
| 2428 | (peigen.c, pepigen.c, pex64igen.c): Likewise. |
| 2429 | (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line. |
| 2430 | (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED). |
| 2431 | (elf32-ia64.c, elf64-ia64.c): Do emit #line. |
| 2432 | (peigen.c, pepigen.c, pex64igen.c): Likewise. |
| 2433 | * Makefile.in: Regenerate. |
| 2434 | |
| 2435 | 2020-01-31 Alan Modra <amodra@gmail.com> |
| 2436 | |
| 2437 | PR 4110 |
| 2438 | * elf.c (setup_group): Don't clear entire section contents, |
| 2439 | just the padding after group flags. Release alloc'd memory |
| 2440 | after a seek or read failure. |
| 2441 | |
| 2442 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
| 2443 | |
| 2444 | * peXXigen.c (pe_is_repro): New function. |
| 2445 | (_bfd_XX_print_private_bfd_data_common): Note timestamp is |
| 2446 | actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present. |
| 2447 | |
| 2448 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
| 2449 | |
| 2450 | * peXXigen.c (debug_type_names): Add names for new debug data type |
| 2451 | values. |
| 2452 | |
| 2453 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
| 2454 | |
| 2455 | * peXXigen.c (pe_print_debugdata): Fix the iteration variable for |
| 2456 | inner loop. Fix a memory leak. |
| 2457 | |
| 2458 | 2020-01-30 Alan Modra <amodra@gmail.com> |
| 2459 | |
| 2460 | * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms |
| 2461 | or obj_coff_keep_strings here. |
| 2462 | (coff_get_normalized_symtab): Free external syms directly. |
| 2463 | * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms |
| 2464 | on error exit path. |
| 2465 | |
| 2466 | 2020-01-27 Jim Wilson <jimw@sifive.com> |
| 2467 | |
| 2468 | * cpu-riscv.c (riscv_scan): New. |
| 2469 | (N): Change bfd_default_scan to riscv_scan. |
| 2470 | |
| 2471 | 2020-01-27 Andreas Schwab <schwab@suse.de> |
| 2472 | |
| 2473 | * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo. |
| 2474 | (ALL_MACHINES_CFILES): Remove cpu-plugin.c. |
| 2475 | * Makefile.in: Regenerate. |
| 2476 | * cpu-plugin.c: Remove. |
| 2477 | * archures.c (enum bfd_architecture): Remove bfd_arch_plugin. |
| 2478 | (bfd_plugin_arch): Remove declaration. |
| 2479 | * bfd-in2.h: Regenerate. |
| 2480 | * po/SRC-POTFILES.in: Regenerate. |
| 2481 | |
| 2482 | 2020-01-27 H.J. Lu <hongjiu.lu@intel.com> |
| 2483 | Alan Modra <amodra@gmail.com> |
| 2484 | |
| 2485 | PR ld/25458 |
| 2486 | * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases. |
| 2487 | |
| 2488 | 2020-01-24 Jim Wilson <jimw@sifive.com> |
| 2489 | |
| 2490 | * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others. |
| 2491 | (riscv_parse_prefixed_ext): Fix s extension comment and reword to |
| 2492 | avoid over long line. |
| 2493 | |
| 2494 | 2020-01-24 Nick Clifton <nickc@redhat.com> |
| 2495 | |
| 2496 | PR 25447 |
| 2497 | * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep |
| 2498 | syms and keep strings flags as these may have been set in order to |
| 2499 | prevent a bogus call to free. |
| 2500 | |
| 2501 | 2020-01-23 Nick Clifton <nickc@redhat.com> |
| 2502 | |
| 2503 | * po/fr.po: Updated French translation. |
| 2504 | |
| 2505 | 2020-01-23 Alan Modra <amodra@gmail.com> |
| 2506 | |
| 2507 | PR 25444 |
| 2508 | * elf.c (assign_file_positions_for_load_sections): Avoid divide |
| 2509 | by zero when p_align is zero. |
| 2510 | |
| 2511 | 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com> |
| 2512 | |
| 2513 | * bfd/elfnn-riscv.c (riscv_skip_prefix): New. |
| 2514 | (riscv_prefix_cmp): Likewise. |
| 2515 | (riscv_non_std_ext_p): Deleted. |
| 2516 | (riscv_std_sv_ext_p): Likewise. |
| 2517 | (riscv_non_std_sv_ext_p): Likewise. |
| 2518 | (riscv_merge_non_std_and_sv_ext): Rename to... |
| 2519 | (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp. |
| 2520 | (riscv_merge_arch_attr_info): Replace 3 calls to |
| 2521 | riscv_merge_non_std_and_sv_ext with single call to |
| 2522 | riscv_merge_multi_letter_ext. |
| 2523 | * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we |
| 2524 | encounter a 'z' prefix. |
| 2525 | (riscv_get_prefix_class): New function, return prefix class based |
| 2526 | on first few characters of input string. |
| 2527 | (riscv_parse_config): New structure to factor out minor differences |
| 2528 | in extension class parsing behaviour. |
| 2529 | (riscv_parse_sv_or_non_std_ext): Rename to... |
| 2530 | (riscv_parse_prefixed_ext): and parameterise with |
| 2531 | riscv_parse_config. |
| 2532 | (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New. |
| 2533 | (riscv_multi_letter_ext_valid_p): New. |
| 2534 | (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New. |
| 2535 | (riscv_parse_subset): Delegate all non-single-letter parsing work |
| 2536 | to riscv_parse_prefixed_ext. |
| 2537 | * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type. |
| 2538 | (riscv_get_prefix_class): Declare. |
| 2539 | |
| 2540 | 2020-01-22 Alan Modra <amodra@gmail.com> |
| 2541 | |
| 2542 | * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group. |
| 2543 | (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for |
| 2544 | __tls_get_addr_desc. |
| 2545 | (ppc64_elf_size_stubs): Add section for linker generated |
| 2546 | __tls_get_addr_desc wrapper function. Loop at least once if |
| 2547 | generating this function. |
| 2548 | (emit_tga_desc, emit_tga_desc_eh_frame): New functions. |
| 2549 | (ppc64_elf_build_stubs): Generate __tls_get_addr_desc. |
| 2550 | |
| 2551 | 2020-01-22 Alan Modra <amodra@gmail.com> |
| 2552 | |
| 2553 | * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave. |
| 2554 | * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and |
| 2555 | tga_desc_fd. |
| 2556 | (is_tls_get_addr): Match tga_desc and tga_desc_df too. |
| 2557 | (STDU_R1_0R1, ADDI_R1_R1): Define. |
| 2558 | (tls_get_addr_prologue, tls_get_addr_epilogue): New functions. |
| 2559 | (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect |
| 2560 | tga_desc_fd to opt_fd, and tga_desc to opt. Set |
| 2561 | no_tls_get_addr_regsave. |
| 2562 | (branch_reloc_hash_match): Add hash3 and hash4. |
| 2563 | (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too. |
| 2564 | (ppc64_elf_size_dynamic_sections): Likewise. |
| 2565 | (ppc64_elf_relocate_section): Likewise. |
| 2566 | (plt_stub_size, build_plt_stub): Likewise. Size regsave |
| 2567 | __tls_get_addr stub. |
| 2568 | (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and |
| 2569 | eh_frame. |
| 2570 | (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size |
| 2571 | eh_frame for regsave __tls_get_addr. |
| 2572 | |
| 2573 | 2020-01-22 Alan Modra <amodra@gmail.com> |
| 2574 | |
| 2575 | * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under |
| 2576 | which __tls_get_addr calls will be eliminated. |
| 2577 | |
| 2578 | 2020-01-20 Nick Clifton <nickc@redhat.com> |
| 2579 | |
| 2580 | * po/pt.po: Updates Portuguese translation. |
| 2581 | * po/ru.po: Updated Russian translation. |
| 2582 | * po/uk.po: Updated Ukranian translation. |
| 2583 | |
| 2584 | 2020-01-20 H.J. Lu <hongjiu.lu@intel.com> |
| 2585 | |
| 2586 | PR ld/25416 |
| 2587 | * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support |
| 2588 | "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in |
| 2589 | X32 mode. |
| 2590 | (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE |
| 2591 | transition, relax "rex leal x@tlsdesc(%rip), %reg" to |
| 2592 | "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax |
| 2593 | "rex leal x@tlsdesc(%rip), %reg" to |
| 2594 | "rex movl x@gottpoff(%rip), %eax". For both transitions, relax |
| 2595 | "call *(%eax)" to "nopl (%rax)". |
| 2596 | |
| 2597 | 2020-01-20 Alan Modra <amodra@gmail.com> |
| 2598 | |
| 2599 | * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1), |
| 2600 | (MTLR_R11): Don't define. |
| 2601 | (LD_R0_0R3, CMPDI_R0_0): Define. |
| 2602 | (build_tls_get_addr_stub): Don't use r11 in stub. |
| 2603 | |
| 2604 | 2020-01-20 Alan Modra <amodra@gmail.com> |
| 2605 | |
| 2606 | * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file. |
| 2607 | (defined_sym_val, is_tls_get_addr): Likewise. |
| 2608 | |
| 2609 | 2020-01-18 Nick Clifton <nickc@redhat.com> |
| 2610 | |
| 2611 | * version.m4 (BFD_VERSION): Set to 2.34.50. |
| 2612 | * configure: Regenerate. |
| 2613 | * po/bfd.pot: Regenerate. |
| 2614 | |
| 2615 | 2020-01-18 Nick Clifton <nickc@redhat.com> |
| 2616 | |
| 2617 | Binutils 2.34 branch created. |
| 2618 | |
| 2619 | 2020-01-17 Christian Biesinger <cbiesinger@google.com> |
| 2620 | |
| 2621 | * coff-arm.c: Fix spelling error (seperate). |
| 2622 | * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling |
| 2623 | error (seperate). |
| 2624 | * sysdep.h (strnlen): Fix spelling error (seperate). |
| 2625 | |
| 2626 | 2020-01-15 Lars Brinkhoff <lars@nocrew.org> |
| 2627 | |
| 2628 | PR 20694 |
| 2629 | * pdp11.c (TARGET_PAGE_SIZE): Set to 8192. |
| 2630 | |
| 2631 | 2020-01-15 Alan Modra <amodra@gmail.com> |
| 2632 | |
| 2633 | PR 25384 |
| 2634 | * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. |
| 2635 | (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies |
| 2636 | of function symbols unless dot symbols are present. Do warn |
| 2637 | whenever one is created, regardles of whether a PLT entry is |
| 2638 | also emitted for the function symbol. |
| 2639 | |
| 2640 | 2020-01-14 Alan Modra <amodra@gmail.com> |
| 2641 | |
| 2642 | * som.c (som_bfd_count_ar_symbols): Error when file position |
| 2643 | of symbols on chains is not strictly increasing. |
| 2644 | |
| 2645 | 2020-01-14 Alan Modra <amodra@gmail.com> |
| 2646 | |
| 2647 | * vms.h (VMS_DEBUG): Define as 0. |
| 2648 | * vms-alpha.c (image_write): Move debug output after bounds check. |
| 2649 | Tidy bounds check. |
| 2650 | (_bfd_vms_slurp_eihd): Warning fix. |
| 2651 | (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings. |
| 2652 | |
| 2653 | 2020-01-13 Alan Modra <amodra@gmail.com> |
| 2654 | |
| 2655 | * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even |
| 2656 | for "ignored" records. |
| 2657 | |
| 2658 | 2020-01-13 Alan Modra <amodra@gmail.com> |
| 2659 | |
| 2660 | * wasm-module.c (wasm_scan_name_function_section): Formatting. |
| 2661 | Delete asect name check. Move asect NULL check to wasm_object_p. |
| 2662 | Correct bounds check of sizes against end. Replace uses of |
| 2663 | bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use |
| 2664 | just one bfd_release. |
| 2665 | (wasm_scan): Don't use malloc/strdup for section names, |
| 2666 | bfd_alloc instead. Simplify code prefixing section name. |
| 2667 | Formatting. Don't attempt to free memory here.. |
| 2668 | (wasm_object_p): ..do so here. |
| 2669 | |
| 2670 | 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com> |
| 2671 | |
| 2672 | PR ld/22269 |
| 2673 | * elf32-arm.c (elf32_arm_final_link_relocate): Use |
| 2674 | UNDEFWEAK_NO_DYNAMIC_RELOC. |
| 2675 | (allocate_dynrelocs_for_symbol): Likewise. |
| 2676 | |
| 2677 | 2020-01-10 Tamar Christina <tamar.christina@arm.com> |
| 2678 | |
| 2679 | PR 25210 |
| 2680 | * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass. |
| 2681 | |
| 2682 | 2020-01-10 Alan Modra <amodra@gmail.com> |
| 2683 | |
| 2684 | * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type. |
| 2685 | |
| 2686 | 2020-01-09 Nick Clifton <nickc@redhat.com> |
| 2687 | |
| 2688 | PR 25221 |
| 2689 | * bfd.c (bfd_convert_section_contents): Check for a compress |
| 2690 | header size that is larger than the actual section size. |
| 2691 | |
| 2692 | 2020-01-08 Alan Modra <amodra@gmail.com> |
| 2693 | |
| 2694 | PR 25351 |
| 2695 | * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms |
| 2696 | after removing sections. |
| 2697 | |
| 2698 | 2020-01-06 Jim Wilson <jimw@sifive.com> |
| 2699 | |
| 2700 | PR 25205 |
| 2701 | * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add |
| 2702 | check for !bfd_link_pic (info). |
| 2703 | <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL. |
| 2704 | <R_RISCV_JAL>: Add comment. |
| 2705 | (_bfd_riscv_relax_section): For plt.offset check, add check for |
| 2706 | bfd_link_pic (info). Add comment. |
| 2707 | |
| 2708 | 2020-01-06 Alan Modra <amodra@gmail.com> |
| 2709 | |
| 2710 | * format.c (bfd_check_format_matches): Ignore bfd_error on target |
| 2711 | match failures. Don't init to bfd_error_wrong_format before |
| 2712 | calling _bfd_check_format. |
| 2713 | |
| 2714 | 2020-01-06 Alan Modra <amodra@gmail.com> |
| 2715 | |
| 2716 | * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail |
| 2717 | status rather than exiting on stack overflow or underflow. |
| 2718 | (_bfd_vms_slurp_etir): Adjust to suit. |
| 2719 | |
| 2720 | 2020-01-06 Alan Modra <amodra@gmail.com> |
| 2721 | |
| 2722 | * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index. |
| 2723 | |
| 2724 | 2020-01-06 Alan Modra <amodra@gmail.com> |
| 2725 | |
| 2726 | * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of |
| 2727 | command. Check name offset is within command. |
| 2728 | (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib), |
| 2729 | (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints), |
| 2730 | (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab), |
| 2731 | (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid), |
| 2732 | (bfd_mach_o_read_linkedit, bfd_mach_o_read_str), |
| 2733 | (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min), |
| 2734 | (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version), |
| 2735 | (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main), |
| 2736 | (bfd_mach_o_read_note, bfd_mach_o_read_build_version), |
| 2737 | (bfd_mach_o_read_segment): Similarly. |
| 2738 | (bfd_mach_o_read_thread): Properly bound check thread struct. |
| 2739 | Don't repeat checks on second loop. |
| 2740 | (bfd_mach_o_read_command): Fail on invalid command length. |
| 2741 | |
| 2742 | 2020-01-04 Alan Modra <amodra@gmail.com> |
| 2743 | |
| 2744 | * format.c (bfd_check_format_matches): Add preserve_match. |
| 2745 | Save initial bfd state in "preserve", matched bfd state in |
| 2746 | "preserve_match". Save just the first match. Release |
| 2747 | bfd_alloc memory. Restore and finish preserved state as |
| 2748 | appropriate on all function exit paths. |
| 2749 | |
| 2750 | 2020-01-04 Alan Modra <amodra@gmail.com> |
| 2751 | |
| 2752 | * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc. |
| 2753 | |
| 2754 | 2020-01-04 Alan Modra <amodra@gmail.com> |
| 2755 | |
| 2756 | * coffgen.c (coff_real_object_p): Free malloc'd memory on target |
| 2757 | match too. |
| 2758 | |
| 2759 | 2020-01-03 Nick Clifton <nickc@redhat.com> |
| 2760 | |
| 2761 | PR 25307 |
| 2762 | (bfd_pef_parse_function_stubs): Correct the test that ensures that |
| 2763 | there is enough data remaining in the code buffer before |
| 2764 | attempting to read a function stub. |
| 2765 | |
| 2766 | 2020-01-03 Nick Clifton <nickc@redhat.com> |
| 2767 | |
| 2768 | PR 25308 |
| 2769 | * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the |
| 2770 | return value from bfd_malloc. |
| 2771 | * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. |
| 2772 | (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. |
| 2773 | (elf32_arm_filter_cmse_symbols): Likewise. |
| 2774 | (elf32_arm_write_section): Likewise. |
| 2775 | * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. |
| 2776 | (bfd_mach_o_follow_dsym): Likewise. |
| 2777 | * pef.c (bfd_pef_print_loader_section): Likewise. |
| 2778 | (bfd_pef_scan_start_address): Likewise. |
| 2779 | (bfd_pef_parse_function_stubs): Likewise. |
| 2780 | (bfd_pef_parse_symbols): Likewise. |
| 2781 | |
| 2782 | 2020-01-03 Sergei Trofimovich <siarheit@google.com> |
| 2783 | |
| 2784 | * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail |
| 2785 | on binary inputs ld/PR25316. |
| 2786 | (is_ia64_elf): new helper to filter on ia64 objects. |
| 2787 | |
| 2788 | 2020-01-03 Jan Beulich <jbeulich@suse.com> |
| 2789 | |
| 2790 | * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore |
| 2791 | in parameter names. |
| 2792 | (bfd_mach_o_scan): Insert underscore in two variable names. |
| 2793 | |
| 2794 | 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com> |
| 2795 | |
| 2796 | * Makefile.am: Add z80-elf target support. |
| 2797 | * configure.ac: Likewise. |
| 2798 | * targets.c: Likewise. |
| 2799 | * Makefile.in: Regenerate. |
| 2800 | * configure: Regenerate. |
| 2801 | * config.bfd: Add z80-elf target support and new arches: ez80 and |
| 2802 | z180. |
| 2803 | * elf32-z80.c: New file. |
| 2804 | * archures.c: Add new z80 architectures: eZ80 and Z180. |
| 2805 | * coffcode.h: Likewise. |
| 2806 | * cpu-z80.c: Likewise. |
| 2807 | * coff-z80.c: Add new relocations for Z80 target and local label |
| 2808 | check. |
| 2809 | * reloc.c: Add new relocs. |
| 2810 | * bfd-in2.h: Regenerate. |
| 2811 | * libbfd.h: Regenerate. |
| 2812 | |
| 2813 | 2020-01-02 Tamar Christina <tamar.christina@arm.com> |
| 2814 | |
| 2815 | PR 25210 |
| 2816 | PR 24753 |
| 2817 | * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. |
| 2818 | |
| 2819 | 2020-01-01 Alan Modra <amodra@gmail.com> |
| 2820 | |
| 2821 | Update year range in copyright notice of all files. |
| 2822 | |
| 2823 | For older changes see ChangeLog-2019 |
| 2824 | \f |
| 2825 | Copyright (C) 2020 Free Software Foundation, Inc. |
| 2826 | |
| 2827 | Copying and distribution of this file, with or without modification, |
| 2828 | are permitted in any medium without royalty provided the copyright |
| 2829 | notice and this notice are preserved. |
| 2830 | |
| 2831 | Local Variables: |
| 2832 | mode: change-log |
| 2833 | left-margin: 8 |
| 2834 | fill-column: 74 |
| 2835 | version-control: never |
| 2836 | End: |