]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Updated Serbian translation for the binutils sub-directory, and Swedish translation...
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
48e5bada
AM
12020-04-28 Alan Modra <amodra@gmail.com>
2
3 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
4 Emit warning message.
5
251dae91
TC
62020-04-27 Tamar Christina <tamar.christina@arm.com>
7
8 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
9 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
10 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
11 to x86_64_pe_big_vec as it not a big-endian format.
12 (vec i386_pe_big_vec): New.
13 * configure.ac: Likewise.
14 * targets.c: Likewise.
15 * configure: Regenerate.
16 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
17 COFF_WITH_PE_BIGOBJ): New.
18 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
19 New.
20 (x86_64_pe_be_vec): Moved.
21
27456742
AK
222020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
23
24 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
25 * elf.c (elfcore_grok_arc_v2): New function.
26 (elfcore_grok_note): Call the new function to handle the corresponding
27 note.
28 (elfcore_write_arc_v2): New function.
29 (elfcore_write_register_note): Call the new function to handle the
30 corresponding pseudo-sections.
31
30ce8e47
MF
322020-04-22 Max Filippov <jcmvbkbc@gmail.com>
33
34 PR ld/25861
35 * bfd-in2.h: Regenerated.
36 * elf32-xtensa.c (elf_howto_table): New entries for
37 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
38 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
39 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
40 R_XTENSA_NDIFF{8,16,32}.
41 * libbfd.h (bfd_reloc_code_real_names): Add names for
42 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
43 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
44 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
45 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
46
c36876fe
TC
472020-04-21 Tamar Christina <tamar.christina@arm.com>
48
49 PR binutils/24753
50 * compress.c (bfd_get_full_section_contents): Exclude sections with no
51 content.
52
6f6fd151
L
532020-04-21 H.J. Lu <hongjiu.lu@intel.com>
54
55 PR ld/25849
56 * elf-bfd.h (elf_backend_data): Add
57 elf_backend_strip_zero_sized_dynamic_sections.
58 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
59 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
60 New macro.
61 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
62 function.
63 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
64 New macro.
65 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
66
1f7f2abb
L
672020-04-21 H.J. Lu <hongjiu.lu@intel.com>
68
69 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
70 sec.
71 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
72 DT_TEXTREL with -M.
73 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
74
e04f33c0
NC
752020-04-21 Nick Clifton <nickc@redhat.com>
76
77 * po/sr.po: Updated Serbian translation.
78
fad3d2c1
AM
792020-04-21 Alan Modra <amodra@gmail.com>
80
81 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
82 processing.
83
23c8270e
SC
842020-04-20 Stephen Casner <casner@acm.org>
85
86 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
87 causing globals from linker script to be treated as debug symbols.
88 (translate_symbol_table): Don't sign-extend symbol values from 16
89 to 64 bits in nm output.
90
2efec98b
AM
912020-04-20 Alan Modra <amodra@gmail.com>
92
93 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
94
18f97353
AM
952020-04-18 Alan Modra <amodra@gmail.com>
96
97 * section.c (bfd_is_const_section): Correct test for special
98 sections.
99 * bfd-in2.h: Regenerate.
100
8d55d10a
AM
1012020-04-17 Alan Modra <amodra@gmail.com>
102
103 PR 25842
104 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
105 NULL nodename.
106
8e4979ac
NC
1072020-04-16 Nick Clifton <nickc@redhat.com>
108
109 PR 25803
110 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
111 abort with a more helpful error message.
112
aec72fda
AM
1132020-04-16 Alan Modra <amodra@gmail.com>
114
115 PR 25827
116 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
117 strdup(0).
118
95a51568
FS
1192020-04-15 Fangrui Song <maskray@google.com>
120
121 PR binutils/24613
122 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
123 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
124 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
125 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
126 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
127 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
128 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
129 * elf32-sh.c (sh_elf_relocate_section): Likewise.
130 * elf32-spu.c (spu_elf_relocate_section): Likewise.
131 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
132 * elflink.c (elf_link_output_extsym): Likewise.
133 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
134
7ecb5154
AM
1352020-04-15 Alan Modra <amodra@gmail.com>
136
137 PR 25823
138 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
139 pointer into strings that may be freed for section name, always
140 allocate a new string.
141
f717994f
JMG
1422020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
143 Jan W. Jagersma <jwjagersma@gmail.com>
144
145 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
146 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
147 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
148 (_bfd_go32_mkobject): New functions.
149 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
150 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
151 (go32exe_mkobject): Call _bfd_go32_mkobject.
152 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
153 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
154 and COFF_GO32.
155 (coff_write_relocs): Enable extended reloc counter code if
156 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
157 (coff_write_object_contents): Likewise. Pad section headers
158 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
159 instead of coff_swap_scnhdr_out.
160 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
161 enable extended reloc counter.
162 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
163 Declare with ATTRIBUTE_UNUSED.
164 * libcoff-in.h: (struct coff_tdata): New field go32.
165 (obj_go32): Define.
166 * libcoff.h: Regenerate.
167
34ca5531
FS
1682020-04-14 Fangrui Song <maskray@google.com>
169
170 PR gas/25768
171 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
172 12.
173
fa1477dc
SC
1742020-04-14 Stephen Casner <casner@acm.org>
175
176 PR ld/25677
177 * pdp11.c: Add implementation of --imagic option.
178 (adjust_o_magic): Fix objcopy --extract-symbol test.
179 * libaout.h (enum aout_magic): Add i_magic.
180
a0543b0b
RO
1812020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
182 Nick Clifton <nickc@redhat.com>
183
184 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
185 <0>: Ignore.
186 <default>: Error rather than abort.
187
3349112e
L
1882020-04-03 H.J. Lu <hongjiu.lu@intel.com>
189
190 PR ld/25767
191 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
192 relocation section from section group.
193
4d095f5b
JJ
1942020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
195
196 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
197 bfd->origin to file offset.
198 * bfdwin.c (bfd_get_file_window): Likewise.
199 * bfd.c: Clarify the use of the bfd->origin field.
200 * bfd-in2.h: Regenerate.
201 * coff-i386.c: Don't include go32exe.h. Allow overriding
202 coff_write_object_contents via COFF_WRITE_CONTENTS.
203 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
204 (go32exe_write_object_contents): New functions.
205 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
206 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
207 (create_go32_stub): Remove check for 2k size limit. Read stub
208 from go32exe_temp_stub if present.
209 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
210 copy variable-length stub.
211 (go32_check_format): Read stub to go32exe_temp_stub, set
212 origin, return go32exe_cleanup.
213 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
214 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
215 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
216 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
217 Remove functions and their associated #defines.
218 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
219 * libcoff-in.h: (struct coff_tdata): New field stub_size.
220 Rename field go32stub to stub.
221 * libcoff.h: Regenerate.
222 * coff-stgo32.c (go32_check_format): Rename to...
223 (go32exe_check_format): ...this.
224 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
225 (go32exe_copy_private_bfd_data): ...this.
226 (stub_bytes): Rename to...
227 (go32exe_default_stub): ...this.
228 (create_go32_stub): Rename to...
229 (go32exe_create_stub): ...this.
230 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
231 when possible.
232
382aae06
L
2332020-04-01 H.J. Lu <hongjiu.lu@intel.com>
234
235 PR ld/25749
236 PR ld/25754
237 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
238 relocation to R_386_32 for relocation against non-preemptible
239 absolute symbol.
240 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
241 allocate dynamic relocation for non-preemptible absolute symbol.
242 (elf_i386_relocate_section): Pass sec to
243 GENERATE_DYNAMIC_RELOCATION_P.
244 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
245 (elf_x86_64_convert_load_reloc): Covert load relocation to
246 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
247 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
248 for non-preemptible absolute symbol if they overflow.
249 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
250 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
251 symbol. Don't allocate dynamic relocation for non-preemptible
252 absolute symbol.
253 (elf_x86_64_relocate_section): Don't generate relative relocation
254 for GOTPCREL relocations aganst local absolute symbol. Pass sec
255 to GENERATE_DYNAMIC_RELOCATION_P.
256 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
257 against non-preemptible absolute symbol.
258 (_bfd_elf_x86_valid_reloc_p): New function.
259 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
260 GOT_ABS GOT slot.
261 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
262 argument. Don't generate dynamic relocation against
263 non-preemptible absolute symbol.
264 (ABS_SYMBOL_P): New.
265 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
266 against non-preemptible absolute symbol.
267 (GOT_ABS): New.
268 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
269 (_bfd_elf_x86_valid_reloc_p): New.
270
a7618269
TC
2712020-04-01 Tamar Christina <tamar.christina@arm.com>
272
273 PR ld/16017
274 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
275 address in the GOT if in thumb only mode.
276
15ccbdd7
TC
2772020-04-01 Tamar Christina <tamar.christina@arm.com>
278
279 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
280
7b948a25
HPN
2812020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
282
283 * mmo.c (mmo_scan): Create .text section only when needed, not
284 from the start.
285
89b599df
AM
2862020-03-31 Alan Modra <amodra@gmail.com>
287
288 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
289 return value check.
290
81699544
AM
2912020-03-31 Alan Modra <amodra@gmail.com>
292
293 * vms-alpha.c (image_write): Check bounds for sections without
294 contents too. Error on non-zero write to section without
295 contents.
296 (_bfd_vms_slurp_etir): Check return of image_write* functions.
297
b3b360de
AM
2982020-03-31 Alan Modra <amodra@gmail.com>
299
300 * tekhex.c (pass_over): Check is_eof before reading buffer.
301
00386881
NC
3022020-03-30 Nick Clifton <nickc@redhat.com>
303
304 PR binutils/pr25662
305 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
306 field to timestamp and make it an integer.
307 * libcoff.h: Regenerate.
308 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
309 field in the pe_data structure rather than the insert_timestamp
310 field.
311
988b7300
AM
3122020-03-30 Alan Modra <amodra@gmail.com>
313
314 PR 25745
315 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
316 statistics message.
317
aa49fc22
NC
3182020-03-26 Nick Clifton <nickc@redhat.com>
319
320 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
321 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
322 prototype.
323 * libbfd.h: Regenerate.
324
ff768510
AM
3252020-03-26 Alan Modra <amodra@gmail.com>
326
327 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
328
f75fbe8a
AM
3292020-03-26 Alan Modra <amodra@gmail.com>
330
331 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
332 array.
333 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
334
aac88046
NC
3352020-03-25 Nick Clifton <nickc@redhat.com>
336
337 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
338 function.
339 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
340 * libbfd.h: Regenerate.
341
cf2611fe
SV
3422020-03-25 Shahab Vahedi <shahab@synopsys.com>
343
344 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
345 correct field name in the output string.
346
d16e3d2e
AM
3472020-03-25 Alan Modra <amodra@gmail.com>
348
349 PR 25662
350 * elf.c (assign_file_positions_for_load_sections): Adjust offset
351 for SHT_NOBITS section if first in segment.
352
1081065c
L
3532020-03-24 H.J. Lu <hongjiu.lu@intel.com>
354
355 PR binutils/25708
356 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
357 (_bfd_elf_get_symbol_version_string): This.
358 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
359 (_bfd_elf_get_symbol_version_string): This.
360 (bfd_elf_print_symbol): Pass TRUE to
361 _bfd_elf_get_symbol_version_string.
362 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
363 bfd_boolean argument.
364 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
365 * targets.c (_bfd_get_symbol_version_string): Likewise.
366 (bfd_get_symbol_version_string): Likewise.
367 * bfd-in2.h: Regenerated.
368
0b8448af 3692020-03-24 Nick Clifton <nickc@redhat.com>
e11cd7c4 370 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
0b8448af
NC
371
372 PR 25713
373 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
374 Win32 systems.
375
ec2e748a
NC
3762020-03-24 Nick Clifton <nickc@redhat.com>
377
378 PR 25681
379 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
380 segment to use for PT_GNU_RELRO, ignore empty sections in a
381 segment's current list.
382
cda7e560
L
3832020-03-24 H.J. Lu <hongjiu.lu@intel.com>
384
385 PR binutils/25717
386 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
387
7e6e972f
L
3882020-03-24 H.J. Lu <hongjiu.lu@intel.com>
389
390 PR binutils/25708
391 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
392 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
393 on the previous _bfd_elf_get_symbol_version_string.
394 (_bfd_elf_get_symbol_version_string): Use it.
395
65109548
AM
3962020-03-24 Alan Modra <amodra@gmail.com>
397
398 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
399 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
400 struct areltdata.
401
fdde2fb6
SH
4022020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
403
404 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
405
cf28cfef
AM
4062020-03-23 Alan Modra <amodra@gmail.com>
407
408 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
409 symbol count. Allocate an extra byte to ensure name strings
410 are terminated. Sanity check name offsets. Release memory on
411 error return.
412
5e737279
AM
4132020-03-23 Alan Modra <amodra@gmail.com>
414
415 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
416 field hasn't been read. Remove unnecessary casts.
417
c15a8f17
AM
4182020-03-22 Alan Modra <amodra@gmail.com>
419
420 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
421 enough to read number of symbols.
422
3d98c460
L
4232020-03-20 H.J. Lu <hongjiu.lu@intel.com>
424
425 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
426 (EXECUTABLE_SUFFIX): Likewise.
427 * config.in: Regenerated.
428 * configure: Likewise.
429 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
430 _bfd_generic_close_and_cleanup.
431 (plugin_list_entry): Remove resolution_file, resolution_option,
432 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
433 lto_wrapper, gcc_env and initialized,
434 (need_lto_wrapper_p): Removed.
435 (get_lto_wrapper): Likewise.
436 (setup_lto_wrapper_env): Likewise.
437 (register_all_symbols_read): Likewise.
438 (egister_cleanup): Likewise.
439 (get_symbols): Likewise.
440 (add_input_file): Likewise.
441 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
442 (add_symbols): Updated.
443 (try_claim): Likewise.
444 (try_load_plugin): Likewise.
445 (bfd_plugin_canonicalize_symtab): Likewise.
446 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
447 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
448
c3a1714c
L
4492020-03-19 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR binutils/25640
452 * plugin.c (plugin_list_entry): Add has_symbol_type.
453 (add_symbols_v2): New function.
454 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
455 provides symbol type.
456 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
457 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
458 available.
459
67338173
AM
4602020-03-20 Alan Modra <amodra@gmail.com>
461
462 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
463 enough to read number of symbols.
464
a859124d
AM
4652020-03-20 Alan Modra <amodra@gmail.com>
466
467 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
468 backend functions for NULL before calling.
469 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
470 (bfd_section_from_shdr, assign_section_numbers): Likewise.
471 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
472 * elfnn-ia64.c (ignore_errors): New function.
473 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
474
f3a08f77
NC
4752020-03-19 Nick Clifton <nickc@redhat.com>
476
477 PR 25676
478 * dwarf2.c (struct varinfo): Add unit_offset field to record the
479 location of the varinfo in the unit's debug info data. Change the
480 type of the stack field to a boolean.
481 (lookup_var_by_offset): New function. Returns the varinfo
482 structure for the variable described at the given offset in the
483 unit's debug info.
484 (scan_unit_for_symbols): Add support for variables which have the
485 DW_AT_specification attribute.
486
6a541707
NC
4872020-03-19 Nick Clifton <nickc@redhat.com>
488
489 PR 25699
490 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
491 error return.
492
effc14f5
SH
4932020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
494
495 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
496
ac4bf06c
NC
4972020-03-18 Nick Clifton <nickc@redhat.com>
498
499 PR 25673
500 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
501 memory access when processing a corrupt secondary reloc section.
502
53215f21
CL
5032020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
504
505 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
506 instead of calling abort.
507 * elf32-csky.c (csky_build_one_stub): Likewise.
508 * elf32-hppa.c (hppa_build_one_stub): Likewise.
509 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
510 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
511 * elf32-metag.c (metag_build_one_stub): Likewise.
512 * elf32-nios2.c (nios2_build_one_stub): Likewise.
513 * elf64-ppc.c (ppc_build_one_stub): Likewise.
514 (ppc_size_one_stub): Likewise.
515 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
516
327ef784
NC
5172020-03-17 Nick Clifton <nickc@redhat.com>
518
d3c3c542 519 PR 25688
327ef784
NC
520 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
521 with error messages.
522
ecbbbdba
NC
5232020-03-17 Nick Clifton <nickc@redhat.com>
524
525 PR 25687
526 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
527 free. Add free on another failure path.
528
4b3ecb3b
AM
5292020-03-16 Alan Modra <amodra@gmail.com>
530
531 PR 25675
532 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
533 we have a non-zero section count. Do lma comparison in octets.
534
7bac4137
AM
5352020-03-16 Alan Modra <amodra@gmail.com>
536
537 * vms-alpha.c (dst_restore_location): Validate index into
538 dst_ptr_offsets array before accessing. Return status.
539 (dst_retrieve_location): Similarly, making "loc" parameter a
540 pointer to return value.
541 (_bfd_vms_slurp_etir): Update calls to above functions.
542
8b5d0a4f
KR
5432020-03-14 Kamil Rytarowski <n54@gmx.com>
544
545 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
546 targets.
547 * configure: Regenerated.
548
48e81d7f
AM
5492020-03-14 Alan Modra <amodra@gmail.com>
550
551 * section.c (BFD_FAKE_SECTIONS): Formatting.
552 * bfd-in2.h: Regenerate.
553
06d949ec
KR
5542020-03-13 Kamil Rytarowski <n54@gmx.com>
555
556 * elf.c (elfcore_grok_netbsd_note): Add support for
557 NT_NETBSDCORE_LWPSTATUS notes.
558
abf874aa
CL
5592020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
560
561 * bfd-in2.h: Regenerate.
562 * section.c (asection): Add already_assigned field.
563 (BFD_FAKE_SECTION): Add default initializer for it.
564 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
565 * elf32-arm.c (arm_build_one_stub): Add support for
566 non_contiguous_regions.
567 * elf32-csky.c (csky_build_one_stub): Likewise.
568 * elf32-hppa.c (hppa_build_one_stub): Likewise.
569 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
570 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
571 * elf32-metag.c (metag_build_one_stub): Likewise.
572 * elf32-nios2.c (nios2_build_one_stub): Likewise.
573 * elf64-ppc.c (ppc_build_one_stub): Likewise.
574 (ppc_size_one_stub): Likewise.
575 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
576 * elflink.c (elf_link_input_bfd): Likewise.
577
74e10d17
L
5782020-03-13 H.J. Lu <hongjiu.lu@intel.com>
579
580 PR ld/24920
581 * elf-linker-x86.h (elf_linker_x86_params): Add
582 static_before_all_inputs and has_dynamic_linker.
583 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
584 dynamic input objects if -static is passed at command-line
585 before all input files without --dynamic-linker unless
586 --no-dynamic-linker is used.
587
015ec493
KR
5882020-03-13 Kamil Rytarowski <n54@gmx.com>
589
590 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
591
66631823
CE
5922020-03-13 Christian Eggers <ceggers@gmx.de>
593
594 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
595 "p_paddr" from "at".
596 * elfcode.h (bfd_from_remote_memory): Add units to several
597 parameters. New local "opb". Fix usage of p_align. Fix
598 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
599 call of target_read_memory.
600 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
601 calculation of "offset" and "output_offset".
602 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
603 from "offset" and fix calculation of "end" from "vma+size". Fix
604 comparison between "sh_addr" and "vma"/"output_offset".
605 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
606 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
607 member.
608 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
609 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
610 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
611 assignment of p_paddr from phdr_lma. Fix comparison between
612 "lma+size" and "next->lma".
613 (elf_sort_segments): Fix assignment from p_paddr to lma.
614 (assign_file_positions_for_load_sections): Add unit (bytes) to
615 local "align". Fix calculation of local "off_adjust". Fix
616 calculation of local "filehdr_vaddr".
617 (assign_file_positions_for_non_load_sections): New local "opb".
618 Fix calculation of "end" from "p_size". Fix comparison between
619 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
620 from "end" and "p_vaddr".
621 (rewrite_elf_program_header): Fix comparison between p_vaddr and
622 vma. Fix assignment to p_paddr from lma. Fix comparison between
623 p_paddr and lma. Fix assignment to p_paddr from lma.
624 * merge.c (sec_merge_emit): New local "opb". Convert
625 "alignment_power" to octets.
626 (_bfd_add_merge_section): New locals "alignment_power" and
627 "opb". Fix comparison between "alignment_power" and
628 "sizeof(align)".
629 (_bfd_merge_sections): New local "opb". Divide size by opb
630 before checking align mask.
631
502794d4
CE
6322020-03-13 Christian Eggers <ceggers@gmx.de>
633
634 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
635 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
636 section LMA/VMA.
637 (_bfd_elf_make_section_from_phdr): Similarly.
638 (elf_fake_sections): Fix calculation of
639 Elf_Internal_shdr::sh_addr from section VMA.
640 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
641 and bytes.
642 (assign_file_positions_for_load_sections): Fix calculations of
643 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
644 comparison between program header address and section LMA.
645 (assign_file_positions_for_non_load_sections): Likewise.
646 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
647 (IS_CONTAINED_BY_VMA): Add parameter opb.
648 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
649 INCLUDE_SECTION_IN_SEGMENT): Likewise.
650 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
651 Fix calculations of p_addr_valid and p_vaddr_offset.
652 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
653 with octets per byte when comparing against p_vaddr.
654
8248d21a
AM
6552020-03-11 Alan Modra <amodra@gmail.com>
656
657 * som.c (setup_sections): Sanity check subspace.name.
658
435edf0b
AM
6592020-03-11 Alan Modra <amodra@gmail.com>
660
661 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
662
6b5e16ff
AM
6632020-03-10 Alan Modra <amodra@gmail.com>
664
665 PR 25648
666 * ihex.c (ihex_write_object_contents): Don't assume ordering of
667 addresses here.
668
2f57795b
AM
6692020-03-09 Alan Modra <amodra@gmail.com>
670
671 * wasm-module.c (wasm_scan): Sanity check file name length
672 before allocating memory. Move common section setup code. Do
673 without bfd_tell to calculate section size.
674
a0dcf297
NC
6752020-03-06 Nick Clifton <nickc@redhat.com>
676
677 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
678 with error messages and failure return values.
679
e15a8da9
MF
6802020-03-05 Max Filippov <jcmvbkbc@gmail.com>
681
682 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
683 relocation sections for any removed reference to a dynamic symbol.
684
a8e14f4c
NC
6852020-03-05 Nick Clifton <nickc@redhat.com>
686
687 * elf-bfd.h (struct elf_backend_data): Add new fields:
688 init_secondary_reloc_section, slurp_secondary_reloc_section,
689 write_secondary_reloc_section.
690 (_bfd_elf_init_secondary_reloc_section): Prototype.
691 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
692 (_bfd_elf_write_secondary_reloc_section): Prototype.
693 * elf.c ( bfd_section_from_shdr): Invoke the new
694 init_secondary_reloc_section backend function, if defined, when a
695 second reloc section is encountered.
696 (swap_out_syms): Invoke the new symbol_section_index function, if
697 defined, when computing the section index of an OS/PROC specific
698 symbol.
699 (_bfd_elf_init_secondary_reloc_section): New function.
700 (_bfd_elf_slurp_secondary_reloc_section): New function.
701 (_bfd_elf_write_secondary_reloc_section): New function.
702 (_bfd_elf_copy_special_section_fields): New function.
703 * elfcode.h (elf_write_relocs): Invoke the new
704 write_secondary_relocs function, if defined, in order to emit
705 secondary relocs.
706 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
707 function, if defined, in order to read in secondary relocs.
708 * elfxx-target.h (elf_backend_copy_special_section_fields):
709 Provide a non-NULL default definition.
710 (elf_backend_init_secondary_reloc_section): Likewise.
711 (elf_backend_slurp_secondary_reloc_section): Likewise.
712 (elf_backend_write_secondary_reloc_section): Likewise.
713 (struct elf_backend_data elfNN_bed): Add initialisers for the new
714 fields.
715 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
716 * configure: Regenerate.
717
6f8f95b4
AM
7182020-03-05 Alan Modra <amodra@gmail.com>
719
720 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
721 against file size before allocating memory. Use bfd_alloc rather
722 than bfd_zalloc for carsym/strings memory.
723
233bf4f8
AM
7242020-03-04 Alan Modra <amodra@gmail.com>
725
726 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
727 sh_addr mod sh_addalign is zero.
728
1039fd9a
AM
7292020-03-04 Alan Modra <amodra@gmail.com>
730
731 * format.c (bfd_check_format_matches): Call cleanup on error exit.
732
f5714099
AM
7332020-03-03 Alan Modra <amodra@gmail.com>
734
735 * format.c (struct bfd_preserve): Add cleanup field.
736 (bfd_preserve_save): Add cleanup param and save.
737 (bfd_preserve_restore): Return cleanup.
738 (bfd_preserve_finish): Call the cleanup for the discarded match.
739 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
740 and clear when preserving a match. Restore cleanup too when
741 restoring that match.
742
40b35c78
AM
7432020-03-02 Alan Modra <amodra@gmail.com>
744
745 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
746 * hpux-core.c (hpux_core_core_file_p): Update prototype.
747 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
748 (core_sco5_vec): Correct initialisers.
749
601b73d5
AM
7502020-03-02 Alan Modra <amodra@gmail.com>
751
752 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
753 * aix5ppc-core.c (xcoff64_core_p): Likewise.
754 * cisco-core.c (cisco_core_file_validate): Likewise.
755 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
756 * hpux-core.c (hpux_core_core_file_p): Likewise.
757 * irix-core.c (irix_core_core_file_p): Likewise.
758 * lynx-core.c (lynx_core_file_p): Likewise.
759 * netbsd-core.c (netbsd_core_file_p): Likewise.
760 * osf-core.c (osf_core_core_file_p): Likewise.
761 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
762 * sco5-core.c (sco5_core_file_p): Likewise.
763
728d32c4
L
7642020-03-02 H.J. Lu <hongjiu.lu@intel.com>
765
766 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
767
cb001c0d
AM
7682020-03-02 Alan Modra <amodra@gmail.com>
769
770 * targets.c (bfd_cleanup): New typedef.
771 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
772 * libbfd-in.h (_bfd_no_cleanup): Define.
773 * format.c (bfd_reinit): Add cleanup parameter, call it.
774 (bfd_check_format_matches): Set cleanup from _bfd_check_format
775 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
776 * aout-target.h (callback, object_p): Return bfd_cleanup.
777 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
778 * archive.c (bfd_generic_archive_p): Likewise.
779 * binary.c (binary_object_p): Likewise.
780 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
781 * coff-ia64.c (ia64coff_object_p): Likewise.
782 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
783 * coff-sh.c (coff_small_object_p): Likewise.
784 * coff-stgo32.c (go32_check_format): Likewise.
785 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
786 (xcoff64_core_p): Likewise.
787 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
788 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
789 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
790 * elfcode.h (elf_object_p): Likewise.
791 * elfcore.h (elf_core_file_p): Likewise.
792 * i386msdos.c (msdos_object_p): Likewise.
793 * ihex.c (ihex_object_p): Likewise.
794 * libaout.h (some_aout_object_p): Likewise.
795 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
796 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
797 * libbfd.c (_bfd_dummy_target): Likewise.
798 * libcoff-in.h (coff_object_p): Likewise.
799 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
800 (bfd_mach_o_arm64_core_p): Likewise.
801 * mach-o-arm.c (bfd_mach_o_arm_object_p),
802 (bfd_mach_o_arm_core_p): Likewise.
803 * mach-o-i386.c (bfd_mach_o_i386_object_p),
804 (bfd_mach_o_i386_core_p): Likewise.
805 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
806 (bfd_mach_o_x86_64_core_p): Likewise.
807 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
808 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
809 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
810 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
811 * mmo.c (mmo_object_p): Likewise.
812 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
813 * peicode.h (coff_real_object_p, pe_ILF_object_p),
814 (pe_bfd_object_p): Likewise.
815 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
816 * ppcboot.c (ppcboot_object_p): Likewise.
817 * rs6000-core.c (rs6000coff_core_p): Likewise.
818 * som.c (som_object_setup, som_object_p): Likewise.
819 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
820 * tekhex.c (tekhex_object_p): Likewise.
821 * vms-alpha.c (alpha_vms_object_p): Likewise.
822 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
823 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
824 * wasm-module.c (wasm_object_p): Likewise.
825 * xsym.c (bfd_sym_object_p): Likewise.
826 * xsym.h (bfd_sym_object_p): Likewise.
827 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
828 return type.
829 * pdp11.c (some_aout_object_p): Likewise.
830 * plugin.c (register_ld_plugin_object_p): Update object_p
831 parameter type.
832 * plugin.h (register_ld_plugin_object_p): Likewise.
833 * bfd-in2.h: Regenerate.
834 * libbfd.h: Regenerate.
835 * libcoff.h: Regenerate.
836
a4dd6c97
AM
8372020-03-02 Alan Modra <amodra@gmail.com>
838
839 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
840 applicable section flags.
841 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
842 (mips_ecoff_bele_vec): Likewise.
843 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
844 and .sbss sections.
845 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
846 (_bfd_ecoff_styp_to_sec_flags): Likewise.
847
bf577467
AM
8482020-03-02 Alan Modra <amodra@gmail.com>
849
850 * elf32-m32r.c (m32r_elf_section_flags): New function.
851 (elf_backend_section_flags): Define.
852 * elf32-nds32.c (nds32_elf_section_flags): New function.
853 (elf_backend_section_flags): Define.
854 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
855 .sbss and .sdata sections.
856 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
857 for SHF_V850_GPREL sections.
858 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
859 FIXME.
860 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
861 for SHF_PARISC_SHORT sections.
862 * elf64-ppc.c (ppc64_elf_section_flags): New function.
863 (elf_backend_section_flags): Define.
864 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
865 for SHF_MIPS_GPREL sections. Delete FIXME.
866
8c803a2d
AM
8672020-03-02 Alan Modra <amodra@gmail.com>
868
869 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
870 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
871 calling elf_backend_section_flags with adjusted params. Use
872 newsect->flags past that point.
873 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
874 special sections.
875 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
876 to have their type overridden, and all sh_flags but processor and
877 os specific.
878 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
879 * elf32-mep.c (mep_elf_section_flags): Likewise.
880 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
881 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
882 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
883 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
884 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
885 stub BFD and non-aarch64 input files when scanning for stubs.
886
7d4b2d2d
AM
8872020-03-02 Alan Modra <amodra@gmail.com>
888
889 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
890 limit to decompressed element size.
891
26f60d59
AM
8922020-03-02 Alan Modra <amodra@gmail.com>
893
894 * vms-lib.c (vms_traverse_index): Add recur_count param and
895 update calls. Fail on excessive recursion.
896
9cb56943
AM
8972020-03-02 Alan Modra <amodra@gmail.com>
898
899 * vms-alpha.c (vms_get_remaining_object_record): Use
900 bfd_realloc_or_free rather than bfd_realloc.
901 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
902 (dst_define_location, parse_module): Likewise, and check realloc
903 return status before using memory. Return status from function
904 adjusting all callers.
905
182ec670
AM
9062020-02-28 Alan Modra <amodra@gmail.com>
907
908 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
909
1b088c82
AM
9102020-02-28 Alan Modra <amodra@gmail.com>
911
912 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
913 Remove duplicate undersize check.
914
5f602802
AM
9152020-02-27 Alan Modra <amodra@gmail.com>
916
917 PR 24511
918 * mmo.c (mmo_scan): Set SEC_DATA for .data.
919
49d9fd42
AM
9202020-02-27 Alan Modra <amodra@gmail.com>
921
922 PR 24511
923 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
924 (coff_section_type): Adjust comment.
925 (decode_section_type): Likewise. Call coff_section_type before
926 decode_section_type.
927 (bfd_decode_symclass): Use 'c' for common sections other than
928 the standard one.
929
05f52dc2
AM
9302020-02-27 Alan Modra <amodra@gmail.com>
931
932 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
933 malloc'd block.
934
ff69a894
AM
9352020-02-27 Alan Modra <amodra@gmail.com>
936
937 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
938 if file is an archive element.
939 * bfd-in2.h: Regenerate.
940
02f7e7ee
AM
9412020-02-26 Alan Modra <amodra@gmail.com>
942
943 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
944 bfd_set_error on failing test. Don't bother changing bfd_error on
945 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
946 Check sym name is within string buffer. Use size_t for some vars.
947 (do_slurp_coff_armap): Use size_t for some variables, fix size of
948 int_buf. Don't change bfd_error on file read error. Use
949 _bfd_mul_overflow when calculating carsym buffer size. Reorder
950 calculations to catch overflows before they occur. malloc and
951 free raw armap rather than using bfd_alloc. Read raw armap before
952 allocating carsym+strings buffer.
953 (_bfd_slurp_extended_name_table): Localize variables. Check
954 name size against file size.
955
cc4c4f40
AM
9562020-02-26 Alan Modra <amodra@gmail.com>
957
958 * vms-lib.c (vms_lib_read_index): Release correct buffer.
959
e0b317de
AM
9602020-02-26 Alan Modra <amodra@gmail.com>
961
962 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
963 malloc. Check for NULL return from bfd_malloc.
964 (rx_table_find, rx_table_map): Likewise.
965 (rx_set_section_contents): Check bfd_alloc return.
966 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
967
dc1e8a47
AM
9682020-02-26 Alan Modra <amodra@gmail.com>
969
970 * aoutx.h: Indent labels correctly. Format error strings.
971 * archive.c: Likewise.
972 * archive64.c: Likewise.
973 * coff-arm.c: Likewise.
974 * coff-rs6000.c: Likewise.
975 * coff-stgo32.c: Likewise.
976 * cpu-arm.c: Likewise.
977 * dwarf2.c: Likewise.
978 * elf-ifunc.c: Likewise.
979 * elf-properties.c: Likewise.
980 * elf-s390-common.c: Likewise.
981 * elf-strtab.c: Likewise.
982 * elf.c: Likewise.
983 * elf32-arm.c: Likewise.
984 * elf32-bfin.c: Likewise.
985 * elf32-cr16.c: Likewise.
986 * elf32-csky.c: Likewise.
987 * elf32-i386.c: Likewise.
988 * elf32-m68k.c: Likewise.
989 * elf32-msp430.c: Likewise.
990 * elf32-nds32.c: Likewise.
991 * elf32-nios2.c: Likewise.
992 * elf32-pru.c: Likewise.
993 * elf32-xtensa.c: Likewise.
994 * elf64-ia64-vms.c: Likewise.
995 * elf64-x86-64.c: Likewise.
996 * elfcode.h: Likewise.
997 * elfcore.h: Likewise.
998 * elflink.c: Likewise.
999 * elfnn-aarch64.c: Likewise.
1000 * elfnn-ia64.c: Likewise.
1001 * elfnn-riscv.c: Likewise.
1002 * elfxx-mips.c: Likewise.
1003 * elfxx-sparc.c: Likewise.
1004 * elfxx-x86.c: Likewise.
1005 * i386lynx.c: Likewise.
1006 * merge.c: Likewise.
1007 * pdp11.c: Likewise.
1008 * plugin.c: Likewise.
1009 * reloc.c: Likewise.
1010
e310298c
AM
10112020-02-26 Alan Modra <amodra@gmail.com>
1012
1013 PR 25593
1014 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
1015 "dyn_loaded".
1016 (bfd_elf_add_dt_needed_tag): Declare.
1017 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
1018 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
1019 from elf_add_dt_needed_tag. Remove soname and doit param.
1020 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
1021 to see whether as-needed lib is already loaded, use dyn_loaded
1022 list instead. When saving and restoring around as-needed lib
1023 handle possibility that dynstr has not been initialised. Don't
1024 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
1025 Mark libs loaded via DT_NEEDED entries of other libs with
1026 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
1027 the output.
1028 (elf_link_check_versioned_symbol): Remove now unneccesary
1029 DYNAMIC check when traversing dyn_loaded list.
1030
b570b954
AM
10312020-02-26 Alan Modra <amodra@gmail.com>
1032
1033 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
1034
ecda9016
L
10352020-02-25 H.J. Lu <hongjiu.lu@intel.com>
1036
1037 PR binutils/25584
1038 * plugin.c (need_lto_wrapper_p): New.
1039 (bfd_plugin_set_program_name): Add an int argument to set
1040 need_lto_wrapper_p.
1041 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
1042 set.
1043 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
1044
a98c743f
AM
10452020-02-24 Alan Modra <amodra@gmail.com>
1046
1047 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
1048
c893ce36
AM
10492020-02-24 Alan Modra <amodra@gmail.com>
1050
1051 * vms-lib.c (struct carsym_mem): Add limit.
1052 (vms_add_index): Heed limit.
1053 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
1054 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
1055 Always return actual number read.
1056 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
1057 assertion with error exit.
1058
7b3c2715
AM
10592020-02-22 Alan Modra <amodra@gmail.com>
1060
1061 PR 25585
1062 * elf.c (assign_file_positions_for_load_sections): Continue linking
1063 on "PHDR segment not covered by LOAD segment" errors.
1064
a4425a57
AM
10652020-02-21 Alan Modra <amodra@gmail.com>
1066
1067 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
1068 overflow check.
1069 (bfd_mach_o_canonicalize_reloc): Likewise.
1070 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
1071 counts and offsets against file size.
1072 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
1073 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
1074 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
1075 against file size. Delete symbol table error message.
1076 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
1077 against file size.
1078 (bfd_mach_o_read_symtab): Likewise.
1079 (bfd_mach_o_read_command): Pass file size.
1080 (bfd_mach_o_scan): Sanity check command count against file size.
1081
dda2980f
AM
10822020-02-21 Alan Modra <amodra@gmail.com>
1083
1084 PR 25569
1085 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
1086 "text", "data" and "bss" section pointer vars. Don't update
1087 section size, just exec header sizes.
1088 (adjust_sizes_and_vmas): Don't update text section size. Set
1089 initial exec header a_text. Print exec headers sizes.
1090 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
1091 (adjust_sizes_and_vmas): Similarly. Formatting.
1092 (final_link): Correct final file extension.
1093
00e49dff
NC
10942020-02-20 Nick Clifton <nickc@redhat.com>
1095
1096 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
1097 callback.
1098 * elfxx-target.h (elf_backend_symbol_section_index): Provide
1099 default definition.
1100 (elfNN_bed): Initialise the symbol_section_index field.
1101 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
1102 OS and PROC specific section indicies. Warn if converting other
1103 reserved incidies to SHN_ABS.
1104
fcaaac0a
SB
11052020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
1106
1107 PR 25537
1108 * cpu-z80.c: Add machine type compatibility checking.
1109
dcf06b89
L
11102020-02-19 H.J. Lu <hongjiu.lu@intel.com>
1111
1112 PR binutils/25355
1113 * plugin.c (plugin_list_entry): Remove handle.
1114 (try_load_plugin): Call dlclose before return.
1115
2c7c5554
AM
11162020-02-19 Alan Modra <amodra@gmail.com>
1117
1118 * libbfd-in.h (_bfd_constant_p): Define.
1119 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
1120 file size before allocating memory.
1121 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
1122 * elf.c (bfd_elf_get_str_section): Likewise.
1123 (_bfd_elf_slurp_version_tables): Likewise.
1124 * libbfd.h: Regenerate.
1125
2bb3687b
AM
11262020-02-19 Alan Modra <amodra@gmail.com>
1127
1128 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
1129 * aoutx.h (aout_get_external_symbols): Replace calls to
1130 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
1131 (slurp_reloc_table): Likewise.
1132 * archive.c (do_slurp_bsd_armap): Likewise.
1133 (do_slurp_coff_armap): Likewise.
1134 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1135 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
1136 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1137 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
1138 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
1139 (_bfd_coff_get_external_symbols): Likewise.
1140 * ecoff.c (ecoff_slurp_symbolic_header),
1141 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
1142 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
1143 (ecoff_indirect_link_order): Likewise.
1144 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
1145 (_bfd_elf_slurp_version_tables): Likewise.
1146 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1147 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1148 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1149 * elf64-alpha.c (READ): Likewise.
1150 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
1151 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1152 * elfcode.h (elf_slurp_symbol_table),
1153 (elf_slurp_reloc_table_from_section): Likewise.
1154 * elflink.c (elf_link_add_object_symbols),
1155 (elf_link_check_versioned_symbol): Likewise.
1156 * elfxx-mips.c (READ): Likewise.
1157 * i386lynx.c (slurp_reloc_table): Likewise.
1158 * lynx-core.c (lynx_core_file_p): Likewise.
1159 * mach-o.c (bfd_mach_o_canonicalize_relocs),
1160 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
1161 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
1162 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
1163 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
1164 (bfd_pef_parse_symbols): Likewise.
1165 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
1166 * som.c (setup_sections, som_slurp_string_table),
1167 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1168 (som_bfd_fill_in_ar_symbols): Likewise.
1169 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
1170 (evax_bfd_print_image): Likewise.
1171 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
1172 * wasm-module.c (wasm_scan): Likewise.
1173 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1174 * xsym.c (bfd_sym_read_name_table),
1175 (bfd_sym_print_type_information_table_entry): Likewise.
1176 * libbfd.h: Regenerate.
1177
806470a2
AM
11782020-02-19 Alan Modra <amodra@gmail.com>
1179
1180 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
1181 reading external relocs.
1182 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
1183 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
1184 after bfd_bread.
1185 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
1186 bfd_release.
1187 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
1188 (m32c_elf_relax_section): Likewise.
1189 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
1190 (rl78_elf_relax_section): Likewise.
1191 * elf32-rx.c (rx_offset_for_reloc): Likewise.
1192 (elf32_rx_relax_section): Likewise.
1193 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
1194 parameter types and use..
1195 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
1196 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
1197 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
1198 being read from file, just the extra.
1199 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
1200 after reading external syms. Free on failure.
1201
1f4361a7
AM
12022020-02-19 Alan Modra <amodra@gmail.com>
1203
1204 * coffcode.h (buy_and_read, coff_slurp_line_table),
1205 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
1206 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
1207 corresponding bfd_alloc call. Adjust variables to suit.
1208 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1209 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
1210 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
1211 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
1212 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
1213 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1214 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1215 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1216 * elf64-alpha.c (READ): Likewise.
1217 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
1218 (elf_slurp_symbol_table, elf_slurp_reloc_table),
1219 (bfd_from_remote_memory): Likewise.
1220 * elfcore.h (core_find_build_id): Likewise.
1221 * elfxx-mips.c (READ): Likewise.
1222 * mach-o.c (bfd_mach_o_mangle_sections),
1223 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
1224 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
1225 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
1226 * som.c (setup_sections, som_prep_for_fixups)
1227 (som_build_and_write_symbol_table, som_slurp_symbol_table),
1228 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1229 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
1230 (som_bfd_ar_write_symbol_stuff): Likewise.
1231 * vms-alpha.c (vector_grow1): Likewise.
1232 * vms-lib.c (vms_add_index): Likewise.
1233 * wasm-module.c (wasm_scan_name_function_section): Likewise.
1234 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
1235 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
1236 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
1237 (bfd_alloc2, bfd_zalloc2): Delete.
1238 (_bfd_mul_overflow): Define.
1239 * libbfd.h: Regenerate.
1240
446f7ed5
AM
12412020-02-19 Alan Modra <amodra@gmail.com>
1242
1243 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
1244 bfd_zalloc2.
1245 (assign_section_numbers): Likewise.
1246 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
1247 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
1248 bfd_malloc2, size_t amt, and unsigned tls_count.
1249 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
1250 * elflink.c (elf_create_symbuf): Use bfd_malloc.
1251 (elf_output_implib): Use bfd_alloc.
1252
b03202e3
AM
12532020-02-19 Alan Modra <amodra@gmail.com>
1254
1255 * bfd.c (struct bfd): Move format and direction to other
1256 bitfields. Add "size".
1257 * bfdio.c (bfd_get_size): Cache size when not writing file.
1258 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
1259 returning zero, ie. unknown.
1260 (bfd_get_alt_debug_link_info): Likewise.
1261 * bfd-in2.h: Regenerate.
1262
7c5fa58e
AM
12632020-02-19 Alan Modra <amodra@gmail.com>
1264
1265 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
1266 bfd_get_file_size twice.
1267 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
1268 zero, ie. unknown, return.
1269 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
1270 * elfcode.h (elf_swap_shdr_in): Likewise.
1271 (elf_object_p): Don't call bfd_get_file_size twice and correct
1272 file size check.
1273
96d3b80f
AM
12742020-02-19 Alan Modra <amodra@gmail.com>
1275
1276 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
1277 FALSE if memory alloc fails. Adjust calls.
1278 * som.c (som_prep_for_fixups): Likewise.
1279 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
1280 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
1281 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
1282 * som.c (som_build_and_write_symbol_table): Return via error_return
1283 on seek failure.
1284 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
1285 (VEC_APPEND_EL): Delete.
1286 (vector_grow1): Return pointer to element. Catch overflow.
1287 Return NULL on memory allocation failure.
1288 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
1289 (alpha_vms_add_fixup_ca): Likewise.
1290 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
1291 before using.
1292 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
1293
986f0783
AM
12942020-02-19 Alan Modra <amodra@gmail.com>
1295
1296 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
1297 * aout-target.h (object_p): Likewise.
1298 * aout-tic30.c (tic30_aout_object_p): Likewise.
1299 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
1300 (emit_stringtab, write_syms, link_hash_table_create),
1301 (aout_link_write_other_symbol): Likewise.
1302 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
1303 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
1304 (_bfd_compute_and_write_armap): Likewise.
1305 * archures.c (bfd_arch_list): Likewise.
1306 * bfd.c (bfd_record_phdr): Likewise.
1307 * binary.c (binary_canonicalize_symtab): Likewise.
1308 * cisco-core.c (cisco_core_file_validate): Likewise.
1309 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
1310 (find_arm_glue, record_arm_to_thumb_glue),
1311 (record_thumb_to_arm_glue): Likewise.
1312 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
1313 (ppc_allocate_toc_section): Likewise.
1314 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
1315 * coff-sh.c (sh_relax_section): Likewise.
1316 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1317 * coffcode.h (handle_COMDAT, coff_new_section_hook),
1318 (coff_set_alignment_hook, coff_mkobject),
1319 (coff_compute_section_file_positions): Likewise.
1320 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
1321 (coff_find_nearest_line_with_names),
1322 ( bfd_coff_set_symbol_class): Likewise.
1323 * cofflink.c (_bfd_coff_link_hash_table_create),
1324 (_bfd_coff_link_input_bfd): Likewise.
1325 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
1326 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
1327 (build_line_info_table, sort_line_sequences),
1328 (line_info_add_include_dir, line_info_add_file_name),
1329 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
1330 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
1331 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
1332 (_bfd_ecoff_find_nearest_line),
1333 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1334 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
1335 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
1336 * elf-m10300.c (mn10300_elf_relax_section),
1337 (elf32_mn10300_link_hash_table_create): Likewise.
1338 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
1339 * elf.c (make_mapping, copy_elf_program_header): Likewise.
1340 * elf32-arm.c (elf32_arm_link_hash_table_create),
1341 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
1342 (elf32_arm_new_section_hook): Likewise.
1343 * elf32-avr.c (elf_avr_new_section_hook),
1344 (elf32_avr_link_hash_table_create, get_local_syms),
1345 (elf32_avr_setup_section_lists): Likewise.
1346 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
1347 (bfin_link_hash_table_create): Likewise.
1348 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
1349 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1350 * elf32-csky.c (csky_elf_link_hash_table_create),
1351 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
1352 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
1353 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
1354 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
1355 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1356 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
1357 * elf32-m32r.c (m32r_elf_link_hash_table_create),
1358 (m32r_elf_check_relocs): Likewise.
1359 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
1360 (elf32_m68hc11_setup_section_lists),
1361 (elf32_m68hc11_size_stubs): Likewise.
1362 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1363 * elf32-metag.c (elf_metag_link_hash_table_create),
1364 (elf_metag_setup_section_lists): Likewise.
1365 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
1366 (microblaze_elf_check_relocs): Likewise.
1367 * elf32-nds32.c (nds32_elf_link_hash_table_create),
1368 (nds32_elf_check_relocs): Likewise.
1369 * elf32-nios2.c (nios2_elf32_setup_section_lists),
1370 (get_local_syms, nios2_elf32_check_relocs),
1371 (nios2_elf32_link_hash_table_create): Likewise.
1372 * elf32-or1k.c (or1k_elf_link_hash_table_create),
1373 (or1k_elf_check_relocs): Likewise.
1374 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
1375 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
1376 * elf32-s390.c (elf_s390_link_hash_table_create),
1377 (elf_s390_check_relocs): Likewise.
1378 * elf32-score.c (score_elf_create_got_section),
1379 (s3_elf32_score_new_section_hook),
1380 (elf32_score_link_hash_table_create): Likewise.
1381 * elf32-score7.c (score_elf_create_got_section),
1382 (s7_elf32_score_new_section_hook): Likewise.
1383 * elf32-sh.c (sh_elf_link_hash_table_create),
1384 (sh_elf_check_relocs): Likewise.
1385 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
1386 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
1387 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
1388 (tilepro_elf_check_relocs): Likewise.
1389 * elf32-v850.c (remember_hi16s_reloc): Likewise.
1390 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
1391 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
1392 (elf_xtensa_new_section_hook): Likewise.
1393 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
1394 (get_got_entry, elf64_alpha_check_relocs): Likewise.
1395 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
1396 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
1397 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
1398 * elf64-ppc.c (ppc64_elf_new_section_hook),
1399 (ppc64_elf_link_hash_table_create, update_local_sym_info),
1400 (update_plt_info, ppc64_elf_check_relocs): Likewise.
1401 * elf64-s390.c (elf_s390_link_hash_table_create),
1402 (elf_s390_check_relocs): Likewise.
1403 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1404 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
1405 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
1406 (elf_link_add_archive_symbols, compute_bucket_count),
1407 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
1408 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
1409 (bfd_elf_final_link): Likewise.
1410 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
1411 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
1412 (elfNN_aarch64_new_section_hook): Likewise.
1413 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
1414 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
1415 (riscv_elf_check_relocs): Likewise.
1416 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
1417 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
1418 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
1419 (_bfd_mips_elf_link_hash_table_create): Likewise.
1420 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
1421 (_bfd_sparc_elf_check_relocs),
1422 (_bfd_sparc_elf_new_section_hook): Likewise.
1423 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
1424 (tilegx_elf_check_relocs): Likewise.
1425 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
1426 * format.c (bfd_check_format_matches): Likewise.
1427 * hash.c (_bfd_stringtab_init): Likewise.
1428 * ihex.c (ihex_scan): Likewise.
1429 * irix-core.c (irix_core_core_file_p): Likewise.
1430 * linker.c (bfd_wrapped_link_hash_lookup),
1431 (_bfd_generic_link_hash_table_create),
1432 (_bfd_generic_reloc_link_order): Likewise.
1433 * lynx-core.c (lynx_core_file_p): Likewise.
1434 * netbsd-core.c (netbsd_core_file_p): Likewise.
1435 * osf-core.c (osf_core_core_file_p): Likewise.
1436 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
1437 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
1438 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
1439 * peicode.h (pe_mkobject): Likewise.
1440 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
1441 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1442 * sco5-core.c (read_uarea): Likewise.
1443 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
1444 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
1445 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
1446 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
1447 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
1448 * srec.c (srec_scan): Likewise.
1449 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
1450 * targets.c (bfd_target_list): Likewise.
1451 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
1452 * trad-core.c (trad_unix_core_file_p): Likewise.
1453 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
1454 (vms_new_section_hook): Likewise.
1455 * wasm-module.c (wasm_make_empty_symbol): Likewise.
1456 * xcofflink.c (xcoff_get_section_contents),
1457 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
1458 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
1459 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
1460
2d0e1217
AM
14612020-02-19 Alan Modra <amodra@gmail.com>
1462
1463 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
1464
99845b3b
L
14652020-02-13 H.J. Lu <hongjiu.lu@intel.com>
1466
1467 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
1468 and use it if it isn't NULL. Remove has_plugin_p argument. Add
1469 a build_list_p argument. Don't search plugin_list. Short circuit
1470 when building the plugin list.
1471 (has_plugin): Renamed to has_plugin_list.
1472 (bfd_plugin_set_plugin): Don't set has_plugin.
1473 (bfd_plugin_specified_p): Check plugin_list instead.
1474 (build_plugin_list): New function.
1475 (load_plugin): Call build_plugin_list and use plugin_list.
1476
22fe7df8
L
14772020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1478
1479 PR binutils/25355
1480 * plugin.c (try_claim): Always clean up for LTO wrapper.
1481 (try_load_plugin): Treat each object as independent. Create a
1482 copy for plugin name.
1483
c675ec1e
NC
14842020-02-11 Nick Clifton <nickc@redhat.com>
1485
1486 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
1487 for addresses in print statements.
1488 (msp430_elf_relax_delete_bytes): Likewise.
1489 (msp430_elf_relax_add_words): Likewise.
1490 (msp430_elf_relax_section): Likewise.
1491
1d07a805
L
14922020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1493
1494 * plugin.c (add_symbols): Clear plugin_data memory.
1495
0aa99dcd
L
14962020-02-10 H.J. Lu <hongjiu.lu@intel.com>
1497
1498 PR binutils/25355
1499 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
1500 (EXECUTABLE_SUFFIX): Likewise.
1501 * config.in: Regenerated.
1502 * configure: Likewise.
1503 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
1504 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
1505 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
1506 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
1507 (get_lto_wrapper): New.
1508 (setup_lto_wrapper_env): Likewise.
1509 (current_plugin): Likewise.
1510 (register_all_symbols_read): Likewise.
1511 (register_cleanup): Likewise.
1512 (get_symbols): Likewise.
1513 (add_input_file): Likewise.
1514 (bfd_plugin_close_and_cleanup): Likewise.
1515 (claim_file): Removed.
1516 (register_claim_file): Set current_plugin->claim_file.
1517 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
1518 lto_syms in current_plugin.
1519 (try_claim): Use current_plugin->claim_file. Call LTO plugin
1520 all_symbols_read handler. Copy real symbols to plugin_data.
1521 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
1522 (try_load_plugin): Don't reuse the previous plugin for LTO
1523 wrapper. Set up GCC LTO wrapper if possible. Don't set
1524 plugin_list_iter->claim_file.
1525 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
1526 possible.
1527 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
1528 real_syms.
1529
ac4280da
JL
15302020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1531
1532 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
1533 check if previous instruction matches a conditional jump inserted
1534 earlier. Invert conditional jump and delete branch in this case.
1535
8d6cb116
JL
15362020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1537
1538 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
1539 msp430_elf_relax_add_words. Support insertion of either one or two
1540 words.
1541 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
1542 needs to be grown. Handle insertion of branch instruction to replace
1543 jump.
1544
d60f5448
JL
15452020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1546
1547 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
1548 debugging relocations.
1549 (msp430_elf_relax_delete_bytes): Likewise.
1550 (msp430_elf_relax_add_two_words): Likewise.
1551 (msp430_elf_relax_section): Likewise.
1552
e1f85e11
AM
15532020-02-10 Alan Modra <amodra@gmail.com>
1554
1555 * archures.c: Wrap overlong z80 comments.
1556 * bfd-in2.h: Regenerate.
1557
9fc0b501
SB
15582020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
1559
1560 PR 25469
1561 * archures.c: Add GBZ80 and Z80N machine values.
1562 * reloc.c: Add BFD_RELOC_Z80_16_BE.
1563 * coff-z80.c: Add support for new reloc.
1564 * coffcode.h: Add support for new machine values.
1565 * cpu-z80.c: Add support for new machine names.
1566 * elf32-z80.c: Add support for new reloc.
1567 * bfd-in2.h: Regenerate.
1568 * libbfd.h: Regenerate.
1569
9984857c
NC
15702020-02-07 Nick Clifton <nickc@redhat.com>
1571
1572 PR 23932
1573 * elf.c (rewrite_elf_program_header): Do not complain if no
1574 sections are mapped to a segment.
1575
5242a0a0
L
15762020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1577
1578 PR ld/25490
1579 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
1580 for garbage collection on __patchable_function_entries section
1581 without linked-to section.
1582
b7d07216
L
15832020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1584
1585 PR gas/25381
1586 * bfd-in2.h: Regenerated.
1587 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
1588 on section if gc_mark of any of its linked-to sections is set
1589 and don't set gc_mark again.
1590 * section.c (asection): Add linked_to_symbol_name to map_head
1591 union.
1592
b93a662b
MR
15932020-02-06 Maciej W. Rozycki <macro@wdc.com>
1594
1595 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
1596 reporting an unrecognized instruction with R_V850_LONGJUMP.
1597
6df4c9c2
AM
15982020-02-05 Alan Modra <amodra@gmail.com>
1599
1600 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
1601
24872cb3
AM
16022020-02-04 Alan Modra <amodra@gmail.com>
1603
1604 * elf32-ppc.c (ppc_elf_relocate_section): After applying
1605 R_PPC_VLE_ADDR20, goto copy_reloc.
1606
ef4627fa
L
16072020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1608
1609 * bfd-in2.h: Regenerated.
1610 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
1611
a8c4d40b
L
16122020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1613
1614 PR gas/25380
1615 * bfd-in2.h: Regenerated.
1616 * ecoff.c (bfd_debug_section): Add section_id.
1617 * section.c (bfd_section): Add section_id.
1618 (SEC_ASSEMBLER_SECTION_ID): New.
1619 (BFD_FAKE_SECTION): Add section_id.
1620
5a9212a1
NC
16212020-02-01 Nick Clifton <nickc@redhat.com>
1622
1623 * config.bfd: Move the c30-aout and tic30-aout targets onto the
1624 obsolete list.
1625
e7cbe0c4
SL
16262020-01-31 Sandra Loosemore <sandra@codesourcery.com>
1627
1628 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
1629 encodings are relative to the GOT on nios2, too.
1630
72ebe8c5
AM
16312020-01-31 Alan Modra <amodra@gmail.com>
1632
1633 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
1634 file. Use $< and $@ in rules.
1635 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
1636 (elf32-ia64.c, elf64-ia64.c): Likewise.
1637 (elf32-riscv.c, elf64-riscv.c): Likewise.
1638 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1639 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
1640 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
1641 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
1642 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1643 * Makefile.in: Regenerate.
1644
327301a4
AM
16452020-01-31 Alan Modra <amodra@gmail.com>
1646
1647 PR 4110
1648 * elf.c (setup_group): Don't clear entire section contents,
1649 just the padding after group flags. Release alloc'd memory
1650 after a seek or read failure.
1651
b5d36aaa
JT
16522020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1653
1654 * peXXigen.c (pe_is_repro): New function.
1655 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
1656 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
1657
1957ab10
JT
16582020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1659
1660 * peXXigen.c (debug_type_names): Add names for new debug data type
1661 values.
1662
87b2920f
JT
16632020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1664
1665 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
1666 inner loop. Fix a memory leak.
1667
72913831
AM
16682020-01-30 Alan Modra <amodra@gmail.com>
1669
1670 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
1671 or obj_coff_keep_strings here.
1672 (coff_get_normalized_symtab): Free external syms directly.
1673 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
1674 on error exit path.
1675
c35d018b
JW
16762020-01-27 Jim Wilson <jimw@sifive.com>
1677
1678 * cpu-riscv.c (riscv_scan): New.
1679 (N): Change bfd_default_scan to riscv_scan.
1680
086b06f3
AS
16812020-01-27 Andreas Schwab <schwab@suse.de>
1682
1683 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
1684 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
1685 * Makefile.in: Regenerate.
1686 * cpu-plugin.c: Remove.
1687 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
1688 (bfd_plugin_arch): Remove declaration.
1689 * bfd-in2.h: Regenerate.
1690 * po/SRC-POTFILES.in: Regenerate.
1691
3024a17a
AM
16922020-01-27 H.J. Lu <hongjiu.lu@intel.com>
1693 Alan Modra <amodra@gmail.com>
1694
1695 PR ld/25458
1696 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
1697
b5f998b2
JW
16982020-01-24 Jim Wilson <jimw@sifive.com>
1699
1700 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
1701 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
1702 avoid over long line.
1703
caa31cfa
NC
17042020-01-24 Nick Clifton <nickc@redhat.com>
1705
1706 PR 25447
1707 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
1708 syms and keep strings flags as these may have been set in order to
1709 prevent a bogus call to free.
1710
24e648d4
NC
17112020-01-23 Nick Clifton <nickc@redhat.com>
1712
1713 * po/fr.po: Updated French translation.
1714
67641dd3
AM
17152020-01-23 Alan Modra <amodra@gmail.com>
1716
1717 PR 25444
1718 * elf.c (assign_file_positions_for_load_sections): Avoid divide
1719 by zero when p_align is zero.
1720
403d1bd9
JW
17212020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
1722
1723 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
1724 (riscv_prefix_cmp): Likewise.
1725 (riscv_non_std_ext_p): Deleted.
1726 (riscv_std_sv_ext_p): Likewise.
1727 (riscv_non_std_sv_ext_p): Likewise.
1728 (riscv_merge_non_std_and_sv_ext): Rename to...
1729 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
1730 (riscv_merge_arch_attr_info): Replace 3 calls to
1731 riscv_merge_non_std_and_sv_ext with single call to
1732 riscv_merge_multi_letter_ext.
1733 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
1734 encounter a 'z' prefix.
1735 (riscv_get_prefix_class): New function, return prefix class based
1736 on first few characters of input string.
1737 (riscv_parse_config): New structure to factor out minor differences
1738 in extension class parsing behaviour.
1739 (riscv_parse_sv_or_non_std_ext): Rename to...
1740 (riscv_parse_prefixed_ext): and parameterise with
1741 riscv_parse_config.
1742 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
1743 (riscv_multi_letter_ext_valid_p): New.
1744 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
1745 (riscv_parse_subset): Delegate all non-single-letter parsing work
1746 to riscv_parse_prefixed_ext.
1747 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
1748 (riscv_get_prefix_class): Declare.
1749
a804e476
AM
17502020-01-22 Alan Modra <amodra@gmail.com>
1751
1752 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
1753 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
1754 __tls_get_addr_desc.
1755 (ppc64_elf_size_stubs): Add section for linker generated
1756 __tls_get_addr_desc wrapper function. Loop at least once if
1757 generating this function.
1758 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
1759 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
1760
9e7028aa
AM
17612020-01-22 Alan Modra <amodra@gmail.com>
1762
1763 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
1764 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
1765 tga_desc_fd.
1766 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
1767 (STDU_R1_0R1, ADDI_R1_R1): Define.
1768 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
1769 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
1770 tga_desc_fd to opt_fd, and tga_desc to opt. Set
1771 no_tls_get_addr_regsave.
1772 (branch_reloc_hash_match): Add hash3 and hash4.
1773 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
1774 (ppc64_elf_size_dynamic_sections): Likewise.
1775 (ppc64_elf_relocate_section): Likewise.
1776 (plt_stub_size, build_plt_stub): Likewise. Size regsave
1777 __tls_get_addr stub.
1778 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
1779 eh_frame.
1780 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
1781 eh_frame for regsave __tls_get_addr.
1782
abc489c6
AM
17832020-01-22 Alan Modra <amodra@gmail.com>
1784
1785 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
1786 which __tls_get_addr calls will be eliminated.
1787
26916852
NC
17882020-01-20 Nick Clifton <nickc@redhat.com>
1789
1790 * po/pt.po: Updates Portuguese translation.
1791 * po/ru.po: Updated Russian translation.
1792 * po/uk.po: Updated Ukranian translation.
1793
14470f07
L
17942020-01-20 H.J. Lu <hongjiu.lu@intel.com>
1795
1796 PR ld/25416
1797 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
1798 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
1799 X32 mode.
1800 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
1801 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
1802 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
1803 "rex leal x@tlsdesc(%rip), %reg" to
1804 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
1805 "call *(%eax)" to "nopl (%rax)".
1806
b9ca1af6
AM
18072020-01-20 Alan Modra <amodra@gmail.com>
1808
1809 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
1810 (MTLR_R11): Don't define.
1811 (LD_R0_0R3, CMPDI_R0_0): Define.
1812 (build_tls_get_addr_stub): Don't use r11 in stub.
1813
ed7007c1
AM
18142020-01-20 Alan Modra <amodra@gmail.com>
1815
1816 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
1817 (defined_sym_val, is_tls_get_addr): Likewise.
1818
1b1bb2c6
NC
18192020-01-18 Nick Clifton <nickc@redhat.com>
1820
1821 * version.m4 (BFD_VERSION): Set to 2.34.50.
1822 * configure: Regenerate.
1823 * po/bfd.pot: Regenerate.
1824
ae774686
NC
18252020-01-18 Nick Clifton <nickc@redhat.com>
1826
1827 Binutils 2.34 branch created.
1828
07f1f3aa
CB
18292020-01-17 Christian Biesinger <cbiesinger@google.com>
1830
1831 * coff-arm.c: Fix spelling error (seperate).
1832 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
1833 error (seperate).
1834 * sysdep.h (strnlen): Fix spelling error (seperate).
1835
0d1cc75d
LB
18362020-01-15 Lars Brinkhoff <lars@nocrew.org>
1837
1838 PR 20694
1839 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
1840
e1c6cf61
AM
18412020-01-15 Alan Modra <amodra@gmail.com>
1842
1843 PR 25384
1844 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
1845 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
1846 of function symbols unless dot symbols are present. Do warn
1847 whenever one is created, regardles of whether a PLT entry is
1848 also emitted for the function symbol.
1849
ef4e5ba5
AM
18502020-01-14 Alan Modra <amodra@gmail.com>
1851
1852 * som.c (som_bfd_count_ar_symbols): Error when file position
1853 of symbols on chains is not strictly increasing.
1854
8ab484c2
AM
18552020-01-14 Alan Modra <amodra@gmail.com>
1856
1857 * vms.h (VMS_DEBUG): Define as 0.
1858 * vms-alpha.c (image_write): Move debug output after bounds check.
1859 Tidy bounds check.
1860 (_bfd_vms_slurp_eihd): Warning fix.
1861 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
1862
b50ef514
AM
18632020-01-13 Alan Modra <amodra@gmail.com>
1864
1865 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
1866 for "ignored" records.
1867
0c0adcc5
AM
18682020-01-13 Alan Modra <amodra@gmail.com>
1869
1870 * wasm-module.c (wasm_scan_name_function_section): Formatting.
1871 Delete asect name check. Move asect NULL check to wasm_object_p.
1872 Correct bounds check of sizes against end. Replace uses of
1873 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
1874 just one bfd_release.
1875 (wasm_scan): Don't use malloc/strdup for section names,
1876 bfd_alloc instead. Simplify code prefixing section name.
1877 Formatting. Don't attempt to free memory here..
1878 (wasm_object_p): ..do so here.
1879
7f026732
SN
18802020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
1881
1882 PR ld/22269
1883 * elf32-arm.c (elf32_arm_final_link_relocate): Use
1884 UNDEFWEAK_NO_DYNAMIC_RELOC.
1885 (allocate_dynrelocs_for_symbol): Likewise.
1886
8cd0e5e9
TC
18872020-01-10 Tamar Christina <tamar.christina@arm.com>
1888
1889 PR 25210
1890 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
1891
71780f45
AM
18922020-01-10 Alan Modra <amodra@gmail.com>
1893
1894 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
1895
b899eb3b
NC
18962020-01-09 Nick Clifton <nickc@redhat.com>
1897
1898 PR 25221
1899 * bfd.c (bfd_convert_section_contents): Check for a compress
1900 header size that is larger than the actual section size.
1901
4c6ee646
AM
19022020-01-08 Alan Modra <amodra@gmail.com>
1903
1904 PR 25351
1905 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
1906 after removing sections.
1907
85f78364
JW
19082020-01-06 Jim Wilson <jimw@sifive.com>
1909
1910 PR 25205
1911 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
1912 check for !bfd_link_pic (info).
1913 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
1914 <R_RISCV_JAL>: Add comment.
1915 (_bfd_riscv_relax_section): For plt.offset check, add check for
1916 bfd_link_pic (info). Add comment.
1917
49078ece
AM
19182020-01-06 Alan Modra <amodra@gmail.com>
1919
1920 * format.c (bfd_check_format_matches): Ignore bfd_error on target
1921 match failures. Don't init to bfd_error_wrong_format before
1922 calling _bfd_check_format.
1923
ab356be7
AM
19242020-01-06 Alan Modra <amodra@gmail.com>
1925
1926 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
1927 status rather than exiting on stack overflow or underflow.
1928 (_bfd_vms_slurp_etir): Adjust to suit.
1929
85d86817
AM
19302020-01-06 Alan Modra <amodra@gmail.com>
1931
1932 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
1933
3e6aa775
AM
19342020-01-06 Alan Modra <amodra@gmail.com>
1935
1936 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
1937 command. Check name offset is within command.
1938 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
1939 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
1940 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
1941 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
1942 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
1943 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
1944 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
1945 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
1946 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
1947 (bfd_mach_o_read_segment): Similarly.
1948 (bfd_mach_o_read_thread): Properly bound check thread struct.
1949 Don't repeat checks on second loop.
1950 (bfd_mach_o_read_command): Fail on invalid command length.
1951
ea933f17
AM
19522020-01-04 Alan Modra <amodra@gmail.com>
1953
1954 * format.c (bfd_check_format_matches): Add preserve_match.
1955 Save initial bfd state in "preserve", matched bfd state in
1956 "preserve_match". Save just the first match. Release
1957 bfd_alloc memory. Restore and finish preserved state as
1958 appropriate on all function exit paths.
1959
f24bdec4
AM
19602020-01-04 Alan Modra <amodra@gmail.com>
1961
1962 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
1963
991fb595
AM
19642020-01-04 Alan Modra <amodra@gmail.com>
1965
1966 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
1967 match too.
1968
f2a3559d
NC
19692020-01-03 Nick Clifton <nickc@redhat.com>
1970
1971 PR 25307
1972 (bfd_pef_parse_function_stubs): Correct the test that ensures that
1973 there is enough data remaining in the code buffer before
1974 attempting to read a function stub.
1975
7a0fb7be
NC
19762020-01-03 Nick Clifton <nickc@redhat.com>
1977
1978 PR 25308
1979 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
1980 return value from bfd_malloc.
1981 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1982 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
1983 (elf32_arm_filter_cmse_symbols): Likewise.
1984 (elf32_arm_write_section): Likewise.
1985 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1986 (bfd_mach_o_follow_dsym): Likewise.
1987 * pef.c (bfd_pef_print_loader_section): Likewise.
1988 (bfd_pef_scan_start_address): Likewise.
1989 (bfd_pef_parse_function_stubs): Likewise.
1990 (bfd_pef_parse_symbols): Likewise.
1991
b26a3d58
ST
19922020-01-03 Sergei Trofimovich <siarheit@google.com>
1993
1994 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
1995 on binary inputs ld/PR25316.
1996 (is_ia64_elf): new helper to filter on ia64 objects.
1997
4bb7a87e
JB
19982020-01-03 Jan Beulich <jbeulich@suse.com>
1999
2000 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
2001 in parameter names.
2002 (bfd_mach_o_scan): Insert underscore in two variable names.
2003
6655dba2
SB
20042020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
2005
2006 * Makefile.am: Add z80-elf target support.
2007 * configure.ac: Likewise.
2008 * targets.c: Likewise.
2009 * Makefile.in: Regenerate.
2010 * configure: Regenerate.
2011 * config.bfd: Add z80-elf target support and new arches: ez80 and
2012 z180.
2013 * elf32-z80.c: New file.
2014 * archures.c: Add new z80 architectures: eZ80 and Z180.
2015 * coffcode.h: Likewise.
2016 * cpu-z80.c: Likewise.
2017 * coff-z80.c: Add new relocations for Z80 target and local label
2018 check.
2019 * reloc.c: Add new relocs.
2020 * bfd-in2.h: Regenerate.
2021 * libbfd.h: Regenerate.
2022
0db131fb
TC
20232020-01-02 Tamar Christina <tamar.christina@arm.com>
2024
2025 PR 25210
2026 PR 24753
2027 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
2028
b14ce8bf
AM
20292020-01-01 Alan Modra <amodra@gmail.com>
2030
2031 Update year range in copyright notice of all files.
2032
0b114740 2033For older changes see ChangeLog-2019
3499769a 2034\f
0b114740 2035Copyright (C) 2020 Free Software Foundation, Inc.
3499769a
AM
2036
2037Copying and distribution of this file, with or without modification,
2038are permitted in any medium without royalty provided the copyright
2039notice and this notice are preserved.
2040
2041Local Variables:
2042mode: change-log
2043left-margin: 8
2044fill-column: 74
2045version-control: never
2046End: