]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
Provide an inline startswith function in bfd.h
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2021-03-21 Alan Modra <amodra@gmail.com>
2
3 * bfd-in.h (startswith): New inline.
4 (CONST_STRNEQ): Use startswith.
5 * bfd-in2.h: Regenerate.
6
7 2021-03-20 Alan Modra <amodra@gmail.com>
8
9 PR 27590
10 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
11 test for .gnu.debuglto*.
12
13 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
14
15 PR ld/27590
16 * elf.c (_bfd_elf_make_section_from_shdr): Treat
17 .gnu.debuglto_.debug_ section as debugging section unless it is
18 marked with SHF_EXCLUDE.
19 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
20 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
21 matching non-debugging sections or linkonce section with comdat
22 section.
23
24 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
25
26 PR ld/27587
27 * dwarf2.c (read_attribute_value): Check version >= 3 for
28 DW_FORM_ref_addr.
29
30 2021-03-16 Nick Clifton <nickc@redhat.com>
31
32 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
33 overrun by using sizeof of the destination x_fname field as the
34 limit for a memcpy.
35
36 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
37
38 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
39
40 2021-03-12 Clément Chigot <clement.chigot@atos.net>
41
42 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
43 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
44 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
45 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
46 BFD_RELOC_PPC64_TLS_ML): New relocations.
47 * bfd-in2.h: Regenerate.
48 * libbfd.h: Regenerate.
49 * coff-rs6000.c (xcoff_calculate_relocation): Call
50 xcoff_reloc_type_tls for TLS relocations.
51 (xcoff_howto_table): Implement TLS relocations.
52 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
53 (xcoff_reloc_type_tls): New function.
54 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
55 (xcoff_howto_table): Likewise.
56 (_bfd_xcoff_reloc_type_lookup): Likewise.
57 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
58 (styp_to_sec_flags): Likewise.
59 (coff_compute_section_file_positions): Avoid file offset
60 optimisation for .data when the previous section is .tdata.
61 (coff_write_object_contents): Handle TLS sections.
62 * coffswap.h (coff_swap_aouthdr_out): Add support for
63 new fields in aouthdr.
64 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
65 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
66 (xcoff_need_ldrel_p): Add cases for TLS relocations.
67 (xcoff_create_ldrel): Add l_symndx for TLS sections.
68
69 2021-03-12 Clément Chigot <clement.chigot@atos.net>
70
71 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
72 New relocations.
73 * bfd-in2.h: Regenerate.
74 * libbfd.h: Regenerate.
75 * coff-rs6000.c (xcoff_calculate_relocation): Call
76 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
77 (xcoff_howto_table): Remove src_mask for TOC relocations.
78 Add R_TOCU and R_TOCL howtos.
79 (_bfd_xcoff_reloc_type_lookup): Add cases for
80 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
81 (xcoff_reloc_type_toc): Compute the whole offset.
82 Implement R_TOCU and R_TOCL.
83 * coff64-rs6000.c (xcoff64_calculate_relocation):
84 Likewise.
85 (xcoff64_howto_table): Likewise.
86 (xcoff64_reloc_type_lookup): Likewise.
87
88 2021-03-12 Clément Chigot <clement.chigot@atos.net>
89
90 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
91 add new relocations.
92 (xcoff_howto_table): Likewise.
93 (xcoff_rtype2howto): Increase r_type maximum value.
94 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
95 of create a new one from scratch. Enable only some relocations
96 to have a changing r_size.
97 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
98 (xcoff64_howto_table): Likewise.
99 (xcoff64_rtype2howto): Likewise.
100 (xcoff64_ppc_relocate_section): Likewise.
101 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
102
103 2021-03-12 Clément Chigot <clement.chigot@atos.net>
104
105 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
106
107 2021-03-12 Clément Chigot <clement.chigot@atos.net>
108
109 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
110 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
111 support for o_cputype field. Avoid creating an empty a.out header
112 for XCOFF64.
113
114 2021-03-12 Clément Chigot <clement.chigot@atos.net>
115
116 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
117 missing smclass.
118
119 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
120
121 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
122 restart_relax, used to check if we need to run the whole
123 relaxations from relax pass 0 to 2 again.
124 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
125 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
126 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
127 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
128 after_allocation to check if we need to run the whole relaxations again.
129 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
130 when the restart_relax is FALSE; At last set restart_relax to TRUE if
131 again is TRUE, too.
132 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
133 (bfd_elf64_riscv_restart_relax_sections): Likewise.
134
135 2021-03-10 Jan Beulich <jbeulich@suse.com>
136
137 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
138 offset.
139
140 2021-03-10 Alan Modra <amodra@gmail.com>
141 Jan Beulich <jbeulich@suse.com>
142
143 * elf.c (bfd_elf_generic_reloc): Make references between debug
144 sections use section relative values.
145
146 2021-03-09 Jan Beulich <jbeulich@suse.com>
147
148 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
149
150 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
151
152 PR ld/27425
153 PR ld/27432
154 * bfd.c (_bfd_get_link_info): New function.
155 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
156 (elf_link_info): New.
157 * libbfd-in.h (_bfd_get_link_info): New prototype.
158 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
159 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
160 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
161 (pex64_link_add_symbols): New function.
162 (coff_bfd_link_add_symbols): New macro.
163 * libbfd.h: Regenerated.
164
165 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
166 Andrew Burgess <andrew.burgess@embecosm.com>
167
168 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
169 * elf.c (elfcore_grok_riscv_csr): New function.
170 (elfcore_grok_note): Handle NT_RISCV_CSR.
171 (elfcore_write_riscv_csr): New function.
172 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
173
174 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
175 Andrew Burgess <andrew.burgess@embecosm.com>
176
177 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
178 (PRPSINFO_PR_PSARGS_LENGTH): Define.
179 (riscv_write_core_note): New function.
180 (riscv_elf_grok_psinfo): Make use of two new length defines.
181 (elf_backend_write_core_note): Define.
182
183 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
184 Andrew Burgess <andrew.burgess@embecosm.com>
185
186 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
187 * elf.c (elfcore_grok_gdb_tdesc): New function.
188 (elfcore_grok_note): Handle NT_GDB_TDESC.
189 (elfcore_write_gdb_tdesc): New function.
190 (elfcore_write_register_note): Handle NT_GDB_TDESC.
191
192 2021-03-05 Nick Clifton <nickc@redhat.com>
193
194 PR 27521
195 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
196 (read_indexed_string): Placeholder function.
197 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
198 forms.
199
200 2021-03-05 Alan Modra <amodra@gmail.com>
201
202 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
203 2020-09-16 changes.
204 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
205 adjustments here instead. Separate pc-relative adjustments
206 from symbol related adjustments. Tidy comments and formatting.
207
208 2021-03-04 Jan Beulich <jbeulich@suse.com>
209
210 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
211 final PE images.
212
213 2021-03-04 Alan Modra <amodra@gmail.com>
214
215 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
216
217 2021-03-03 Alan Modra <amodra@gmail.com>
218
219 PR 27500
220 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
221 processing not when start/stop symbol section is unmarked but
222 on first time a start/stop symbol is processed.
223
224 2021-03-03 Alan Modra <amodra@gmail.com>
225
226 * reloc.c: Include x86_64.h rather than internal.h.
227
228 2021-03-02 Nick Clifton <nickc@redhat.com>
229
230 PR 27484
231 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
232 function and variable tags and a second time to resolve their
233 attributes.
234
235 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
236
237 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
238
239 2021-03-02 Alan Modra <amodra@gmail.com>
240
241 PR 27451
242 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
243 linker defined start/stop symbols when start_stop_gc.
244
245 2021-03-02 Alan Modra <amodra@gmail.com>
246
247 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
248 indirect to pc-relative or toc-relative for undefined symbols.
249
250 2021-03-01 Alan Modra <amodra@gmail.com>
251 Fangrui Song <maskray@google.com>
252
253 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
254 defined start/stop symbols when start_stop_gc.
255 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
256 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
257 * linker.c (bfd_generic_define_start_stop): Likewise.
258
259 2021-02-25 Alan Modra <amodra@gmail.com>
260
261 PR 27441
262 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
263 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
264 use when deciding an as-needed library should be loaded instead
265 of using the binding of the library definition.
266
267 2021-02-24 Alan Modra <amodra@gmail.com>
268
269 PR 27459
270 * coff-stgo32.c (go32exe_check_format): Sanity check size of
271 header to avoid a buffer overflow.
272
273 2021-02-22 Alan Modra <amodra@gmail.com>
274
275 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
276 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
277
278 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
279
280 PR 27158
281 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
282 (_bfd_riscv_relax_call): Likewise.
283 (_bfd_riscv_relax_lui): Likewise.
284 * elfxx-riscv.c (howto_table): Likewise.
285
286 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
287
288 * Makefile.am: Added cpu-riscv.h.
289 * Makefile.in: Regenerated.
290 * po/SRC-POTFILES.in: Regenerated.
291 * cpu-riscv.h: Added to support spec versions controlling.
292 Also added extern arrays and functions for cpu-riscv.c.
293 (enum riscv_spec_class): Define all spec classes here uniformly.
294 (struct riscv_spec): Added for all specs.
295 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
296 (RISCV_GET_SPEC_NAME): Likewise.
297 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
298 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
299 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
300 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
301 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
302 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
303 (riscv_priv_specs): Moved below.
304 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
305 (riscv_isa_specs): Moved from include/opcode/riscv.h.
306 * elfnn-riscv.c: Included cpu-riscv.h.
307 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
308 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
309 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
310 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
311
312 2021-02-17 Alan Modra <amodra@gmail.com>
313
314 * wasm-module.c: Guard include of limits.h.
315 (CHAR_BIT): Provide backup define.
316 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
317 Correct signed overflow checking.
318
319 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
320
321 PR 27200
322 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
323 copying the elf flags from input BFD to output BFD, until we have
324 checked if the input BFD has no code section or not. Also fix the
325 problem that we only check the first section rather than the entire
326 sections for input BFD.
327
328 2021-02-16 Alan Modra <amodra@gmail.com>
329
330 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
331 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
332
333 2021-02-15 Jan Beulich <jbeulich@suse.com>
334
335 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
336 * doc/Makefile.in: Re-generate.
337
338 2021-02-15 Alan Modra <amodra@gmail.com>
339
340 * elf32-nds32.c (nds32_get_section_contents): Replace
341 bfd_malloc_and_get_section with bfd_get_full_section_contents.
342 (nds32_elf_relax_delete_blanks): Init contents.
343 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
344
345 2021-02-15 Alan Modra <amodra@gmail.com>
346
347 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
348 bfd_get_full_section_contents.
349
350 2021-02-14 Alan Modra <amodra@gmail.com>
351
352 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
353 all fixes to bfd_generic_get_relocated_section_contents since this
354 function was split out.
355
356 2021-02-11 Alan Modra <amodra@gmail.com>
357
358 * config.bfd: Remove ia64 from obsolete list.
359
360 2021-02-11 Alan Modra <amodra@gmail.com>
361
362 PR ld/22269
363 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
364
365 2021-02-11 Alan Modra <amodra@gmail.com>
366
367 PR 27294
368 * elf32-avr.c (avr_elf32_load_records_from_section): Use
369 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
370 unnecessary casts.
371
372 2021-02-11 Alan Modra <amodra@gmail.com>
373
374 PR 27291
375 * section.c (bfd_get_section_contents): Avoid possible overflow
376 when range checking offset and count.
377 (bfd_set_section_contents): Likewise.
378
379 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
380
381 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
382 favour of LIBINTL.
383 * configure: Regenerated.
384
385 2021-02-09 Alan Modra <amodra@gmail.com>
386
387 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
388 * configure.ac: Delete symbian entries.
389 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
390 * elf32-arm.c: Remove symbian support. Formatting.
391 * targets.c: Delete symbian entries.
392 * configure: Regenerate.
393
394 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
395
396 PR ld/19609
397 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
398 info when failed to convert GOTPCREL relocation.
399
400 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
401
402 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
403
404 2021-02-04 Alan Modra <amodra@gmail.com>
405
406 PR 27311
407 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
408 libraries for IR references on pass over libraries after LTO
409 recompilation.
410
411 2021-02-03 Alan Modra <amodra@gmail.com>
412
413 PR 27311
414 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
415 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
416 libraries when H is an indirect symbol after calling
417 _bfd_elf_add_default_symbol.
418
419 2021-02-03 Alan Modra <amodra@gmail.com>
420
421 PR 27311
422 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
423 undecorated symbol will have a different version.
424
425 2021-02-02 Alan Modra <amodra@gmail.com>
426
427 PR 27311
428 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
429 Use when handling default versioned symbol. Rename existing
430 override variable to nondef_override and use for non-default
431 versioned symbol.
432 (elf_link_add_object_symbols): Adjust call to suit. Don't
433 pull in as-needed libraries when override is set.
434
435 2021-02-01 Emery Hemingway <ehmry@posteo.net>
436
437 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
438
439 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
440
441 PR 27254
442 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
443 offset for the R_RL78_RH_SADDR relocation.
444
445 2021-01-29 Alan Modra <amodra@gmail.com>
446
447 PR 27271
448 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
449 on symbols defined in absolute or other special sections.
450
451 2021-01-28 Alan Modra <amodra@gmail.com>
452
453 PR 27259
454 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
455 prevent endless looping of linked-to sections.
456
457 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
458
459 * bfd-elf.h (elfcore_write_file_note): New function.
460 * elf.c (elfcore_write_file_note): New function.
461
462 2021-01-26 Alan Modra <amodra@gmail.com>
463
464 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
465
466 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
467
468 PR binutils/27231
469 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
470 number tables.
471
472 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
473
474 PR binutils/27231
475 * dwarf2.c (read_rnglists): Advance rngs_ptr after
476 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
477
478 2021-01-20 Alan Modra <amodra@gmail.com>
479
480 * elf32-ppc.c: Delete outdated comment.
481 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
482 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
483
484 2021-01-20 Alan Modra <amodra@gmail.com>
485
486 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
487 section symbols are present.
488
489 2021-01-19 Alan Modra <amodra@gmail.com>
490
491 * elf64-ppc.c (elf_hash_entry): New inline function. Use
492 throughout to replace casts.
493 (branch_reloc_hash_match): Remove const from params.
494 (use_local_plt): New function.
495 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
496 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
497 Use use_local_plt.
498 * elf32-ppc.c (use_local_plt): New function.
499 (allocate_dynrelocs, ppc_elf_relocate_section),
500 (write_global_sym_plt): Use use_local_plt.
501
502 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR ld/27193
505 * elflink.c (elf_create_symbuf): Also ignore section symbols.
506
507 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
508
509 PR ld/23169
510 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
511 check pointer_equality_needed.
512
513 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
514
515 * elf-linker-x86.h (elf_linker_x86_params): Add
516 report_relative_reloc.
517 * elf32-i386.c (elf_i386_relocate_section): Call
518 _bfd_x86_elf_link_report_relative_reloc to report relative
519 relocations for -z report-relative-reloc.
520 (elf_i386_finish_dynamic_symbol): Likewse.
521 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
522 (elf_x86_64_finish_dynamic_symbol): Likewse.
523 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
524 function.
525 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
526 prototype.
527
528 2021-01-16 Alan Modra <amodra@gmail.com>
529
530 * compress.c (decompress_contents): Tidy inflateEnd result test.
531
532 2021-01-16 Alan Modra <amodra@gmail.com>
533
534 PR 26002
535 * elflink.c (elf_link_output_extsym): Use version 1 in
536 .gnu.version for undefined unversioned symbols.
537
538 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
539
540 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
541 caused the by previous commit accidentally.
542
543 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
544
545 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
546 also aligned the code.
547
548 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
549
550 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
551
552 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
553
554 * elfnn-riscv.c: Comments tidy and improvement.
555 * elfxx-riscv.c: Likewise.
556 * elfxx-riscv.h: Likewise.
557
558 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
559
560 PR ld/26688
561 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
562 section for R_BFIN_FUNCDESC.
563
564 2021-01-14 Nick Clifton <nickc@redhat.com>
565
566 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
567
568 2021-01-13 Alan Modra <amodra@gmail.com>
569
570 * Makefile.in: Regenerate.
571 * doc/Makefile.in: Regenerate.
572
573 2021-01-13 Alan Modra <amodra@gmail.com>
574
575 PR 27160
576 * section.c (struct bfd_section): Remove pattern field.
577 (BFD_FAKE_SECTION): Adjust to suit.
578 * bfd-in2.h: Regenerate.
579 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
580 (bfd_elf_final_link): Don't call elf_fixup_link_order.
581
582 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
583
584 PR binutils/26792
585 * configure.ac: Use GNU_MAKE_JOBSERVER.
586 * aclocal.m4: Regenerated.
587 * configure: Likewise.
588
589 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
590
591 PR ld/27171
592 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
593 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
594
595 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
596
597 PR ld/27173
598 * configure: Regenerated.
599
600 2021-01-11 Nick Clifton <nickc@redhat.com>
601
602 * po/fr.po: Updated French translation.
603 * po/pt.po: Updated Portuguese translation.
604 * po/sr.po: Updated Serbian translation.
605 * po/uk.po: Updated Ukranian translation.
606
607 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
608
609 * configure: Regenerated.
610
611 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
612
613 PR ld/27166
614 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
615 -z lam-u48 and -z lam-u57.
616
617 2021-01-09 Nick Clifton <nickc@redhat.com>
618
619 * version.m4: Change to 2.36.50.
620 * configure: Regenerate.
621 * po/bfd.pot: Regenerate.
622
623 2021-01-09 Nick Clifton <nickc@redhat.com>
624
625 * 2.36 release branch crated.
626
627 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
628
629 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
630 LAM_U57 when setting LAM_U48.
631
632 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
633
634 PR ld/26256
635 PR ld/27160
636 * elflink.c (elf_fixup_link_order): Verify that fixing up
637 SHF_LINK_ORDER doesn't increase the output section size.
638
639 2021-01-09 Alan Modra <amodra@gmail.com>
640
641 * configure: Regenerate.
642
643 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
644
645 * configure: Regenerate.
646
647 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
648
649 PR 27109
650 * aix386-core.c (core_aix386_vec): Initialize
651 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
652 * aout-target.h (MY (vec)): Likewise.
653 * binary.c (binary_vec): Likewise.
654 * cisco-core.c (core_cisco_be_vec): Likewise.
655 (core_cisco_le_vec): Likewise.
656 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
657 * coff-i386.c (TARGET_SYM): Likewise.
658 (TARGET_SYM_BIG): Likewise.
659 * coff-ia64.c (TARGET_SYM): Likewise.
660 * coff-mips.c (mips_ecoff_le_vec): Likewise.
661 (mips_ecoff_be_vec): Likewise.
662 (mips_ecoff_bele_vec): Likewise.
663 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
664 (powerpc_xcoff_vec): Likewise.
665 * coff-sh.c (sh_coff_small_vec): Likewise.
666 (sh_coff_small_le_vec): Likewise.
667 * coff-tic30.c (tic30_coff_vec): Likewise.
668 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
669 (tic54x_coff0_beh_vec): Likewise.
670 (tic54x_coff1_vec): Likewise.
671 (tic54x_coff1_beh_vec): Likewise.
672 (tic54x_coff2_vec): Likewise.
673 (tic54x_coff2_beh_vec): Likewise.
674 * coff-x86_64.c (TARGET_SYM): Likewise.
675 (TARGET_SYM_BIG): Likewise.
676 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
677 (rs6000_xcoff64_aix_vec): Likewise.
678 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
679 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
680 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
681 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
682 (TARGET_LITTLE_SYM): Likewise.
683 * hppabsd-core.c (core_hppabsd_vec): Likewise.
684 * hpux-core.c (core_hpux_vec): Likewise.
685 * i386msdos.c (i386_msdos_vec): Likewise.
686 * ihex.c (ihex_vec): Likewise.
687 * irix-core.c (core_irix_vec): Likewise.
688 * mach-o-target.c (TARGET_NAME): Likewise.
689 * mmo.c (mmix_mmo_vec): Likewise.
690 * netbsd-core.c (core_netbsd_vec): Likewise.
691 * osf-core.c (core_osf_vec): Likewise.
692 * pdp11.c (MY (vec)): Likewise.
693 * pef.c (pef_vec): Likewise.
694 (pef_xlib_vec): Likewise.
695 * plugin.c (plugin_vec): Likewise.
696 * ppcboot.c (powerpc_boot_vec): Likewise.
697 * ptrace-core.c (core_ptrace_vec): Likewise.
698 * sco5-core.c (core_sco5_vec): Likewise.
699 * som.c (hppa_som_vec): Likewise.
700 * srec.c (srec_vec): Likewise.
701 (symbolsrec_vec): Likewise.
702 * tekhex.c (tekhex_vec): Likewise.
703 * trad-core.c (core_trad_vec): Likewise.
704 * verilog.c (verilog_vec): Likewise.
705 * vms-alpha.c (alpha_vms_vec): Likewise.
706 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
707 * wasm-module.c (wasm_vec): Likewise.
708 * xsym.c (sym_vec): Likewise.
709 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
710 isn't set.
711 (elf_map_symbols): Don't include ignored section symbols.
712 * elfcode.h (elf_slurp_symbol_table): Also set
713 BSF_SECTION_SYM_USED on STT_SECTION symbols.
714 * elflink.c (bfd_elf_final_link): Generated section symbols only
715 when emitting relocations or reqired.
716 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
717 * syms.c (BSF_SECTION_SYM_USED): New.
718 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
719 (bfd_target): Add keep_unused_section_symbols.
720 (bfd_keep_unused_section_symbols): New.
721 * bfd-in2.h: Regenerated.
722
723 2021-01-07 Nick Clifton <nickc@redhat.com>
724
725 PR 25713
726 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
727 absolute paths and check to see if they are longer than MAX_PATH.
728
729 2021-01-07 Philipp Tomsich <prt@gnu.org>
730
731 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
732
733 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
734 Jim Wilson <jimw@sifive.com>
735 Andrew Waterman <andrew@sifive.com>
736 Maxim Blinov <maxim.blinov@embecosm.com>
737 Kito Cheng <kito.cheng@sifive.com>
738 Nelson Chu <nelson.chu@sifive.com>
739
740 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
741
742 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
743
744 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
745 (bfinfdpic_check_relocs): Likewise.
746
747 2021-01-06 Alan Modra <amodra@gmail.com>
748
749 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
750 on unknown r_type.
751 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
752
753 2021-01-06 Alan Modra <amodra@gmail.com>
754
755 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
756 (sparc64-*-solaris2*): Add sparc_elf64_vec and
757 sparc_elf32_vec.
758
759 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
760
761 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
762 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
763 * configure.ac: Handle riscv_elf[32|64]_be_vec.
764 * configure: Regenerate.
765 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
766 riscv_is_insn_reloc.
767 (riscv_get_insn): RISC-V instructions are always little endian, but
768 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
769 the insturctions.
770 (riscv_put_insn): Likewsie.
771 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
772 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
773 use riscv_[get|put]_insn or bfd_[get|put].
774 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
775 or bfd_[get|put]l16 for code.
776 (riscv_elf_relocate_section): Likewise.
777 (riscv_elf_finish_dynamic_symbol): Likewise.
778 (riscv_elf_finish_dynamic_sections): Likewise.
779 (_bfd_riscv_relax_call): Likewise.
780 (_bfd_riscv_relax_lui): Likewise.
781 (_bfd_riscv_relax_align): Likewise.
782 (_bfd_riscv_relax_pc): Likewise.
783 (riscv_elf_object_p): Handled for big endian.
784 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
785 * targets.c: Add riscv_elf[32|64]_be_vec.
786 (_bfd_target_vector): Likewise.
787
788 2021-01-05 Alan Modra <amodra@gmail.com>
789
790 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
791 for relocatable executable.
792
793 2021-01-05 Alan Modra <amodra@gmail.com>
794
795 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
796
797 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
798
799 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
800 make sure gp symbol is output as a dynamic symbol.
801
802 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
803
804 PR ld/26256
805 * elflink.c (compare_link_order): Place unordered sections before
806 ordered sections.
807 (elf_fixup_link_order): Add a link info argument. Allow mixed
808 ordered and unordered input sections for non-relocatable link.
809 Sort the consecutive bfd_indirect_link_order sections with the
810 same pattern. Change the offsets of the bfd_indirect_link_order
811 sections only.
812 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
813 * section.c (bfd_section): Add pattern.
814 (BFD_FAKE_SECTION): Initialize pattern to NULL.
815 * bfd-in2.h: Regenerated.
816
817 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
818
819 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
820 of private flags with 0x.
821 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
822
823 2021-01-04 Alan Modra <amodra@gmail.com>
824
825 PR 26822
826 * elflink.c (elf_link_input_bfd): Use the file base name in
827 linker generated STT_FILE symbols.
828
829 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
830
831 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
832 * elfxx-riscv.h: Add declaration.
833 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
834 riscv_compare_subsets to check the orders.
835 (riscv_skip_prefix): Removed.
836 (riscv_prefix_cmp): Removed.
837
838 2021-01-04 Alan Modra <amodra@gmail.com>
839
840 PR 26741
841 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
842 calculating subset version length.
843
844 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
845
846 * xcofflink.c: Correct spelling in comments.
847
848 2021-01-01 Alan Modra <amodra@gmail.com>
849
850 Update year range in copyright notice of all files.
851
852 For older changes see ChangeLog-2020
853 \f
854 Copyright (C) 2021 Free Software Foundation, Inc.
855
856 Copying and distribution of this file, with or without modification,
857 are permitted in any medium without royalty provided the copyright
858 notice and this notice are preserved.
859
860 Local Variables:
861 mode: change-log
862 left-margin: 8
863 fill-column: 74
864 version-control: never
865 End: