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