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