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