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