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