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