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