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