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