Memory leak in dwarf2.c
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2019-09-02 Alan Modra <amodra@gmail.com>
2
3 PR 11983
4 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
5 on success. Tidy.
6
7 2019-08-31 Jim Wilson <jimw@sifive.com>
8
9 PR 23825
10 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
11 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
12
13 2019-08-30 Jim Wilson <jimw@sifive.com>
14
15 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
16 error, call bfd_set_error, set ret to FALSE, and goto out label.
17
18 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
19
20 PR ld/24951
21 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
22 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
23
24 2019-08-29 Alan Modra <amodra@gmail.com>
25
26 PR 24697
27 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
28 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
29 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
30 reloc.
31
32 2019-08-29 Alan Modra <amodra@gmail.com>
33
34 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
35 on second insn, return it in poff.
36 (ppc64_elf_relocate_section): Add offset to paddi addend for
37 PCREL_OPT.
38
39 2019-08-28 Jim Wilson <jimw@sifive.com>
40
41 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
42 section when setting max_alignment. Update comment.
43 (_bfd_riscv_relax_pc): Likewise.
44
45 2019-08-29 Alan Modra <amodra@gmail.com>
46
47 PR 24891
48 * bfd.c (struct bfd): Add no_element_cache.
49 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
50 archive cache when no_element_cache.
51 (bfd_generic_archive_p): Set no_element_cache when opening first
52 element to check format. Close first element too.
53 (do_slurp_bsd_armap): Don't zero ardata->cache here.
54 * bfd-in2.h: Regenerate.
55
56 2019-08-24 Alan Modra <amodra@gmail.com>
57
58 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
59 symbols from GOT optimisation.
60
61 2019-08-23 Stafford Horne <shorne@gmail.com>
62
63 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
64 PLT GOT entries.
65
66 2019-08-23 Nick Clifton <nickc@redhat.com>
67
68 PR 24456
69 * elf.c (bfd_section_from_shdr): Issue an informative warning
70 message and continue processing other sections after encountering
71 a reloc section for a section which already has other relocs
72 associated with it.
73
74 2019-08-23 Alan Modra <amodra@gmail.com>
75
76 PR 24933
77 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
78 on error without freeing plts[] contents.
79
80 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
81
82 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
83
84 2019-08-22 Nick Clifton <nickc@redhat.com>
85
86 PR 24922
87 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
88 reading data from extra records.
89
90 2019-08-22 Tamar Christina <tamar.christina@arm.com>
91
92 PR ld/24601
93 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
94 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
95 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
96 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
97 for weak TLS.
98
99 2019-08-22 Alan Modra <amodra@gmail.com>
100
101 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
102 instead recognize CMSE_PREFIX in symbol name.
103 (elf32_arm_gc_mark_extra_sections): Likewise.
104 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
105 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
106
107 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
108
109 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
110 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
111
112 2019-08-20 Tamar Christina <tamar.christina@arm.com>
113
114 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
115 elf32_arm_stub_long_branch_v4t_thumb_thumb,
116 elf32_arm_stub_long_branch_v4t_thumb_arm,
117 elf32_arm_stub_short_branch_v4t_thumb_arm,
118 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
119 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
120 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
121 previous instruction.
122
123 2019-08-19 Tom Tromey <tromey@adacore.com>
124
125 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
126 holding symbols.
127
128 2019-08-19 Alan Modra <amodra@gmail.com>
129
130 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
131 to has_optrel.
132 (struct _ppc64_elf_section_data): Likewise.
133 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
134 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
135 than TOC loop. Check PLT16 insns too.
136
137 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
138
139 PR ld/24905
140 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
141 PC-relative relocations back to ...
142 (elf_x86_64_relocate_section): Here.
143
144 2019-08-16 Martin Liska <mliska@suse.cz>
145
146 PR ld/24912
147 * elflink.c: Report error only for not relocatable.
148 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
149 here lto_slim_object as it's handled in caller.
150
151 2019-08-16 Alan Modra <amodra@gmail.com>
152
153 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
154
155 2019-08-15 Jim Wilson <jimw@sifive.com>
156
157 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
158 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
159 to c.li instruction, and use ENCODE_RVC_IMM to set value.
160
161 2019-08-15 Tom Tromey <tromey@adacore.com>
162
163 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
164 of section.
165
166 2019-08-14 Alan Modra <amodra@gmail.com>
167
168 PR 24623
169 * dwarf2.c (stash_comp_unit): New function, extracted from..
170 (_bfd_dwarf2_find_nearest_line): ..here.
171 (find_abstract_instance): Parse comp units and decode line info
172 as needed.
173
174 2019-08-14 Alan Modra <amodra@gmail.com>
175
176 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
177 (comp_unit_find_nearest_line): Use it here..
178 (_bfd_dwarf2_find_symbol_bias): ..and here.
179
180 2019-08-14 Alan Modra <amodra@gmail.com>
181
182 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
183 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
184 * coffgen.c (coff_find_nearest_line_with_names): Adjust
185 _bfd_dwarf2_find_nearest_line calls.
186 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
187 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
188 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
189 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
190 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
191 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
192 * libbfd.h: Regenerate.
193
194 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
195
196 * elf-bfd.h (struct elf_backend_data): New members.
197 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
198 .gnu.hash section if necessary.
199 (struct collect_gnu_hash_codes): New member.
200 (elf_gnu_hash_process_symidx): New function name.
201 (elf_renumber_gnu_hash_syms): Ignore local and undefined
202 symbols. Record xlat location for every symbol which should have
203 a .MIPS.xhash entry.
204 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
205 dynamic section if necessary.
206 (GNU_HASH_SECTION_NAME): New define.
207 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
208 Update the section size info.
209 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
210 (struct mips_elf_link_hash_entry): New member.
211 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
212 table location.
213 (mips_elf_sort_hash_table): Initialize the pointer to the
214 .MIPS.xhash section.
215 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
216 translation table entry with the symbol dynindx.
217 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
218 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
219 info.
220 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
221 section.
222 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
223 dynamic section.
224 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
225 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
226 sh_link info.
227 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
228 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
229 (_bfd_mips_post_process_headers): Mark the ABI version as
230 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
231 but not a .hash section.
232 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
233 position in the translation table, associated with the hash
234 entry.
235 * elfxx-mips.h (literal_reloc_p): Define
236 elf_backend_record_xhash_symbol backend hook.
237 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
238 backend hook.
239
240 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
241
242 * elf64-bpf.c (bpf_elf_relocate_section): New function.
243 (bpf_elf_insn_disp_reloc): Delete function.
244 (elf_backend_relocate_section): Define.
245
246 2019-08-07 Alan Modra <amodra@gmail.com>
247
248 PR 24644
249 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
250 for overflow in expressions involving nsymz.
251
252 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
253
254 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
255 two pages in relro presence.
256
257 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
258
259 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
260 (get_wsr_lbeg_opcode): New functions.
261 (check_loop_aligned): Detect relaxed loops and adjust loop_len
262 and insn_len for the first actual instruction of the loop.
263
264 2019-07-30 Alan Modra <amodra@gmail.com>
265
266 PR 24768
267 * bfd.c (struct bfd): Add lto_slim_object flag.
268 * bfd-in2.h: Regenerate.
269
270 2019-07-29 Martin Liska <mliska@suse.cz>
271
272 PR 24768
273 * archive.c (_bfd_compute_and_write_armap): Come up with
274 report_plugin_err variable.
275 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
276 * elf.c (struct lto_section): New.
277 (_bfd_elf_make_section_from_shdr): Parse content of
278 .gnu_lto_.lto section.
279 * elflink.c: Report error for a missing LTO plugin.
280 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
281
282 2019-07-28 Alan Modra <amodra@gmail.com>
283
284 PR 24857
285 PR 24339
286 * elflink.c (elf_link_add_object_symbols): Report an informative
287 error on finding local symbols with index equal or greater than
288 symbol table sh_info. Correct comment. Allow such symbols in
289 dynamic objects. Abort on NULL section for symbol.
290
291 2019-07-26 Alan Modra <amodra@gmail.com>
292
293 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
294 (elf_linker): Don't define.
295 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
296
297 2019-07-25 YunQiang Su <syq@debian.org>
298
299 PR 24832
300 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
301 mips inputs.
302
303 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
304
305 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
306 formating.
307 (reloc_type_to_name): Fix formating.
308 (arc_elf_object_p): Likewise.
309 (debug_arc_reloc): Likewise.
310 (arc_do_relocation): Likewise.
311
312 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
313
314 * elf32-arc.c (bfd_get_32_me): New function.
315 (bfd_put_32_me): Likewise.
316 (arc_elf_relax_section): Likewise.
317 (bfd_elf32_bfd_relax_section): Define.
318
319 2019-07-24 Alan Modra <amodra@gmail.com>
320
321 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
322 elf_backend_final_write_processing, don't pass linker arg.
323 (_bfd_elf_final_write_processing): Update prototype.
324 * elf.c (_bfd_elf_write_object_contents): Adjust call.
325 (_bfd_elf_final_write_processing): Return error on incompatible
326 OSABI and has_gnu_osabi. Remove linker arg.
327 * elf-nacl.h (nacl_final_write_processing): Update prototype.
328 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
329 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
330 (_bfd_mips_elf_final_write_processing): Likewise.
331 * elf-hppa.h (elf_hppa_final_write_processing): Return status
332 and remove linker arg.
333 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
334 * elf-nacl.c (nacl_final_write_processing): Likewise.
335 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
336 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
337 * elf32-arm.c (arm_final_write_processing): Likewise.
338 (elf32_arm_final_write_processing): Likewise.
339 (elf32_arm_nacl_final_write_processing): Likewise.
340 (elf32_arm_vxworks_final_write_processing): Likewise.
341 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
342 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
343 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
344 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
345 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
346 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
347 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
348 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
349 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
350 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
351 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
352 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
353 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
354 * elf32-ppc.c (ppc_final_write_processing): Likewise.
355 (ppc_elf_final_write_processing): Likewise.
356 (ppc_elf_vxworks_final_write_processing): Likewise.
357 * elf32-sparc.c (sparc_final_write_processing): Likewise.
358 (elf32_sparc_final_write_processing): Likewise.
359 (elf32_sparc_vxworks_final_write_processing): Likewise.
360 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
361 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
362 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
363 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
364 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
365 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
366 (_bfd_mips_elf_final_write_processing): Likewise.
367
368 2019-07-24 Alan Modra <amodra@gmail.com>
369
370 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
371 early.
372 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
373 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
374
375 2019-07-24 Alan Modra <amodra@gmail.com>
376
377 * elf32-visium.c (visium_elf_post_process_headers): Don't set
378 EI_OSABI header byte here.
379 (ELF_OSABI): Define.
380
381 2019-07-23 Alan Modra <amodra@gmail.com>
382
383 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
384 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
385 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
386 when elf_gnu_osabi_mbind is set.
387 (_bfd_elf_map_sections_to_segments): Likewise.
388 (_bfd_elf_init_private_section_data): Likewise.
389 (_bfd_elf_final_write_processing): Update comment.
390 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
391 (elf_backend_special_sections): Define without .tbss for linux.
392
393 2019-07-23 Alan Modra <amodra@gmail.com>
394
395 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
396 Remove none, any, all enums.
397 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
398 (_bfd_elf_final_write_processing): Declare.
399 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
400 elf_backend_final_write_processing.
401 (_bfd_elf_post_process_headers): Move body of function to..
402 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
403 only when not already set. Adjust for rename.
404 * elfxx-target.h (elf_backend_final_write_processing): Default to
405 _bfd_elf_final_write_processing.
406 * elf-hppa.h (elf_hppa_final_write_processing): Call
407 _bfd_elf_final_write_processing.
408 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
409 * elf-nacl.c (nacl_final_write_processing): Likewise.
410 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
411 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
412 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
413 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
414 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
415 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
416 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
417 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
418 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
419 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
420 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
421 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
422 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
423 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
424 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
425 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
426 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
427 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
428 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
429 * elf32-arm.c (arm_final_write_processing): Split out from..
430 (elf32_arm_final_write_processing): ..here. Call
431 _bfd_elf_final_write_processing.
432 (elf32_arm_nacl_final_write_processing): Adjust.
433 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
434 (_bfd_mips_elf_final_write_processing): ..here. Call
435 _bfd_elf_final_write_processing.
436 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
437 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
438 * elf32-ppc.c (ppc_final_write_processing): Split out from..
439 (ppc_elf_final_write_processing): ..here. Call
440 _bfd_elf_final_write_processing.
441 (ppc_elf_vxworks_final_write_processing): Adjust.
442 * elf32-sparc.c (sparc_final_write_processing): Split out from..
443 (elf32_sparc_final_write_processing): ..here. Call
444 _bfd_elf_final_write_processing.
445 (elf32_sparc_vxworks_final_write_processing): Adjust.
446 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
447 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
448 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
449 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
450 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
451 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
452 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
453 * elflink.c (elf_link_add_object_symbols): Likewise.
454 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
455 instead.
456
457 2019-07-23 Omar Majid <omajid@redhat.com>
458
459 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
460 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
461 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
462 AMD64_NETBSD_MAGIC.
463 * peXXigen.c: Add comment about source of .NET magic numbers.
464
465 2019-07-19 Alan Modra <amodra@gmail.com>
466
467 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
468 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
469 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
470 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
471 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
472 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
473 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
474 (ppc64_elf_check_relocs): Support pcrel tls relocs.
475 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
476 * bfd-in2.h: Regenerate.
477 * libbfd.h: Regenerate.
478
479 2019-07-18 Alan Modra <amodra@gmail.com>
480
481 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
482 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
483 match test.
484
485 2019-07-18 Alan Modra <amodra@gmail.com>
486
487 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
488 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
489 is more than 8 bits.
490 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
491 tls_type vars unsigned int.
492 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
493 to select r_type edit.
494
495 2019-07-18 Alan Modra <amodra@gmail.com>
496
497 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
498 Correct comment.
499 * elf64-ppc.c (TLS_GDIE): Likewise.
500
501 2019-07-18 Alan Modra <amodra@gmail.com>
502
503 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
504 range of tp-relative offsets.
505
506 2019-07-15 Alan Modra <amodra@gmail.com>
507
508 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
509 alias is no longer bfd_link_hash_defined, clear the alias.
510
511 2019-07-13 Alan Modra <amodra@gmail.com>
512
513 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
514 tls_sec.
515 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
516 (_bfd_elf_init_2_index_sections): Likewise.
517 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
518 relocations for local TLS symbols, use STN_UNDEF as the relocation
519 symbol.
520 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
521 leave TLS symbol value in the addend.
522
523 2019-07-08 Alan Modra <amodra@gmail.com>
524
525 PR 24785
526 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
527 size before reading first word.
528
529 2019-07-02 Nick Clifton <nickc@redhat.com>
530
531 PR 24717
532 * elf.c (is_debuginfo_file): New function.
533 (assign_file_positions_for_non_load_sections): Do not warn about
534 allocated sections outside of loadable segments if they are found
535 in a debuginfo file.
536 * elf-bfd.h (is_debuginfo_file): Prototype.
537
538 2019-07-02 Nick Clifton <nickc@redhat.com>
539
540 PR 24753
541 * compress.c (bfd_get_full_section_contents): Do not complain
542 about linker created sections that are larger than the file size.
543
544 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
545
546 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
547 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
548 for CMSE stubs.
549 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
550
551 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
552
553 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
554 sections when .text section contain secure entry functions
555 is marked.
556
557 2019-07-01 Nick Clifton <nickc@redhat.com>
558
559 PR 23839
560 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
561 section VMA in the offset used to update exidx relocs.
562
563 2019-06-28 Nick Clifton <nickc@redhat.com>
564
565 PR 24708
566 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
567 large version reference section.
568 * compress.c (bfd_get_full_section_contents): Check for an
569 uncompressed section whose size is larger than the file size.
570
571 2019-06-28 Alan Modra <amodra@gmail.com>
572
573 * format.c (bfd_check_format_matches): Don't match plugin target
574 if another target matches. Expand comment.
575 * targets.c (_bfd_target_vector): Move plugin_vec after all other
576 non-corefile targets, outside !SELECT_VECS.
577 * config.bfd: Don't handle targ=plugin here.
578 * configure.ac: Don't add plugin to enable_targets or handle in
579 target loop setting selvecs and other target vars.
580 * configure: Regenerate.
581
582 2019-06-26 Nick Clifton <nickc@redhat.com>
583
584 PR 24703
585 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
586 messages for failures.
587 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
588 if returning an error value.
589
590 2019-06-25 Jan Beulich <jbeulich@suse.com>
591
592 * elf-properties.c (elf_find_and_remove_property): Rename last
593 parameter. Mention it in comment.
594
595 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
596
597 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
598 SEC_MERGE or SEC_CODE flags are set.
599 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
600 symtype consistently. Don't include sec_addr (sym_sec) in symval.
601 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
602 Add sec_addr (sym_sec) after handling merge sections.
603
604 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
605
606 PR ld/24721
607 * elf-properties.c (elf_merge_gnu_property_list): Remove the
608 property after reporting property removal.
609
610 2019-06-23 Alan Modra <amodra@gmail.com>
611
612 PR 24704
613 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
614 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
615 Reduce range of offsets allowed for other GOT relocs.
616
617 2019-06-23 Alan Modra <amodra@gmail.com>
618
619 PR 24689
620 * elfcode.h (elf_object_p): Warning fix.
621
622 2019-06-21 Alan Modra <amodra@gmail.com>
623
624 PR 24689
625 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
626
627 2019-06-19 Alan Modra <amodra@gmail.com>
628
629 PR 24697
630 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
631 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
632
633 2019-06-19 Alan Modra <amodra@gmail.com>
634
635 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
636 functions that require r2 valid to use local entry.
637 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
638
639 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
640
641 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
642 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
643 with elfNN_aarch64_allocate_local_dynrelocs.
644
645 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
646
647 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
648
649 2019-06-14 Alan Modra <amodra@gmail.com>
650
651 * Makefile.in: Regenerate.
652 * configure: Regenerate.
653
654 2019-06-14 Alan Modra <amodra@gmail.com>
655
656 * elf64-ppc.c: Fix comments involving paddi.
657
658 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
659
660 PR 24643
661 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
662 absent, or the bfd is not in the ELF formart.
663 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
664
665 2019-06-10 Christos Zoulas <christos@zoulas.com>
666
667 PR 24650
668 * elf.c (elfcore_make_auxv_note_section): New function.
669 (elfcore_grok_note): Use it.
670 (elfcore_grok_freebsd_note): Likewise.
671 (elfcore_grok_openbsd_note): Likewise.
672 (elfcore_grok_netbsd_note): Likewise. Plus add support for
673 NT_NETBSDCORE_AUXV notes.
674
675 2019-06-06 Sudakshina Das <sudi.das@arm.com>
676
677 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
678 alignment of the new gnu property section.
679
680 2019-06-06 Sudakshina Das <sudi.das@arm.com>
681
682 * bfd-in.h: Change comment.
683 * bfd-in2.h: Regenerate.
684 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
685 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
686 Likwise.
687
688 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
689
690 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
691 Remove overflow check.
692
693 2019-05-28 Alan Modra <amodra@gmail.com>
694
695 PR 24596
696 * cofflink.c (coff_link_check_archive_element): Don't assume
697 element is a coff object file after calling add_archive_element.
698
699 2019-05-28 Alan Modra <amodra@gmail.com>
700
701 PR 24596
702 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
703 attempt to set sh_entsize for excluded PLT section.
704
705 2019-05-28 Alan Modra <amodra@gmail.com>
706
707 PR 24596
708 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
709 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
710 allocated in alpha_dynamic_entries_for_reloc.
711
712 2019-05-28 Alan Modra <amodra@gmail.com>
713
714 PR 24596
715 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
716 on NULL output_section.
717 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
718
719 2019-05-28 Alan Modra <amodra@gmail.com>
720
721 PR 24596
722 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
723 entry when MUST_FIND. Abort when MUST_FIND not found.
724 (elf_m68k_get_bfd2got_entry): Likewise.
725 (elf_m68k_relocate_section): Remove now useless assert.
726
727 2019-05-28 Alan Modra <amodra@gmail.com>
728
729 PR 24596
730 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
731 from bfd_link_info, not an output section owner.
732 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
733 (elf_hppa_final_link_relocate): Likewise.
734
735 2019-05-28 Alan Modra <amodra@gmail.com>
736
737 PR 24596
738 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
739 create_object_symbols_section, obj_textsec, obj_datasec or
740 obj_bsssec. Fix other errors in placement.
741 * config.bfd: Obsolete tic30-aout.
742
743 2019-05-28 Alan Modra <amodra@gmail.com>
744
745 PR 24596
746 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
747 end of section list as well as section_count.
748 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
749 section list before returning error.
750
751 2019-05-27 Alan Modra <amodra@gmail.com>
752
753 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
754
755 2019-05-27 Alan Modra <amodra@gmail.com>
756
757 PR 24596
758 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
759
760 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
761
762 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
763 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
764 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
765 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
766 (elf_backend_merge_symbol_attribute): Define.
767
768 2019-05-24 Alan Modra <amodra@gmail.com>
769
770 * po/SRC-POTFILES.in: Regenerate.
771
772 2019-05-24 Alan Modra <amodra@gmail.com>
773
774 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
775 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
776 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
777 (struct ppc_link_hash_table): Add powerxx_stubs.
778 (ppc64_elf_check_relocs): Set powerxx_stubs.
779 (build_powerxx_offset, size_powerxx_offset),
780 (num_relocs_for_powerxx_offset),
781 (emit_relocs_for_powerxx_offset): New functions.
782 (plt_stub_size): Size powerxx stubs.
783 (ppc_build_one_stub): Emit powerxx stubs.
784 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
785 powerxx stubs.
786
787 2019-05-24 Alan Modra <amodra@gmail.com>
788
789 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
790 R_PPC64_GOT_PCREL34.
791 (xlate_pcrel_opt): New function.
792 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
793 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
794 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
795
796 2019-05-24 Alan Modra <amodra@gmail.com>
797
798 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
799 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
800 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
801 (BFD_RELOC_PPC64_PLT_PCREL34),
802 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
803 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
804 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
805 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
806 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
807 * elf64-ppc.c (PNOP): Define.
808 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
809 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
810 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
811 relocs.
812 (ppc64_elf_prefix_reloc): New function.
813 (struct ppc_link_hash_table): Add notoc_plt.
814 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
815 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
816 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
817 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
818 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
819 possible need for dynamic relocs on non-pcrel powerxx relocs.
820 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
821 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
822 (toc_adjusting_stub_needed): Likewise.
823 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
824 (ppc64_elf_relocate_section): Handle new powerxx relocs.
825 * bfd-in2.h: Regenerate.
826 * libbfd.h: Regenerate.
827
828 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
829
830 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
831 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
832 bpf_elf64_be_vec.
833 * configure: Regenerate.
834
835 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
836
837 * configure: Regenerated.
838 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
839 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
840 (BFD64_BACKENDS): Add elf64-bpf.lo.
841 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
842 * Makefile.in (SOURCE_HFILES): Regenerate.
843 * config.bfd (targ_cpu): Handle bpf-*-* targets.
844 * cpu-bpf.c: New file.
845 * elf64-bpf.c: Likewise.
846 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
847 bpf_elf64_le_vec.
848 * archures.c: Define architecture bfd_arch_bpf and machine
849 bfd_arch_bpf.
850 * reloc.c: Define BFD relocations used by the BPF target.
851 * bfd-in2.h: Regenerated.
852 * libbfd.h: Likewise.
853
854 2019-05-22 Alan Modra <amodra@gmail.com>
855
856 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
857 contents.
858
859 2019-05-22 Alan Modra <amodra@gmail.com>
860
861 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
862 processing on "size error in section".
863
864 2019-05-22 Alan Modra <amodra@gmail.com>
865
866 * som.c (som_bfd_free_cached_info): Call
867 _bfd_generic_close_and_cleanup.
868
869 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
870
871 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
872 for TLS_TPREL_HI16(/LO16) relocations in shared library.
873
874 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
875
876 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
877 checks. Search the RELA table for n64 relocations.
878
879 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
880 Faraz Shahbazker <fshahbazker@wavecomp.com>
881
882 * elfxx-mips.c (LA25_BC): New macro.
883 (mips_elf_link_hash_table)<compact_branches>: New field.
884 (STUB_JALRC): New macro.
885 (mipsr6_o32_exec_plt0_entry_compact): New array.
886 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
887 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
888 (mipsr6_exec_plt_entry_compact): Likewise.
889 (mips_elf_create_la25_stub): Use BC instead of J for stubs
890 when compact_branches is true.
891 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
892 PLT for MIPSR6 with compact_branches. Do not reorder the
893 compact branches PLT. Switch the lazy stub for MIPSR6
894 with compact_branches to use JALRC.
895 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
896 when compact_branches is true.
897 (_bfd_mips_elf_compact_branches): New function.
898 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
899
900 2019-05-21 Tamar Christina <tamar.christina@arm.com>
901
902 PR ld/24373
903 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
904 Fix print formatter.
905
906 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
907
908 PR 24460
909 * elf32-arm.c (get_value_helper): Remove.
910 (elf32_arm_final_link_relocate): Fix branch future relocations.
911
912 2019-05-21 Tamar Christina <tamar.christina@arm.com>
913
914 PR ld/24373
915 * bfd-in.h (enum erratum_84319_opts): New
916 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
917 int to enum erratum_84319_opts.
918 * bfd-in2.h: Regenerate.
919 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
920 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
921 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
922 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
923 (_bfd_aarch64_resize_stubs): Amend comment.
924 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
925 requested.
926 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
927 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
928 erratum workaround.
929 (clear_erratum_843419_entry): Update erratum conditional.
930
931 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
932
933 PR ld/24571
934 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
935 when computing distance_short_enough.
936
937 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
938
939 PR ld/24564
940 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
941 Wrap around even if distance equals avr_pc_wrap_around.
942
943 2019-05-20 Nick Clifton <nickc@redhat.com>
944
945 * po/fr.po: Updated French translation.
946
947 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
948
949 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
950
951 2019-05-16 Alan Modra <amodra@gmail.com>
952
953 * elf32-arm.c (elf32_arm_write_section): Revert last change.
954
955 2019-05-15 Alan Modra <amodra@gmail.com>
956
957 * elf32-arm.c (elf32_arm_write_section): Don't leave
958 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
959 unitialised section contents.
960
961 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
962
963 PR 19921
964 * verilog.c: (VerilogDataWidth): New variable.
965 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
966
967 2019-05-08 Nick Clifton <nickc@redhat.com>
968
969 PR 24523
970 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
971 rather than FALSE if encountering a non-ELF file.
972
973 2019-05-06 Alan Modra <amodra@gmail.com>
974
975 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
976
977 2019-05-06 Alan Modra <amodra@gmail.com>
978
979 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
980 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
981 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
982 * libbfd.h: Regenerate.
983 * bfd-in2.h: Regenerate.
984
985 2019-05-04 Alan Modra <amodra@gmail.com>
986
987 PR 24511
988 * syms.c (coff_section_type): Only allow '.', '$' and numeric
989 following the standard section names.
990 (bfd_decode_symclass): Prioritize section flag tests in
991 decode_section_type before name tests in coff_section_type.
992 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
993 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
994 their names and choose standard .text section flags for
995 fake_section.
996
997 2019-05-02 Nick Clifton <nickc@redhat.com>
998
999 PR 24493
1000 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1001 .gnu.debugaltlink sections as debugging sections.
1002
1003 2019-04-30 Alan Modra <amodra@gmail.com>
1004
1005 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1006 (struct _ppc64_elf_section_data): Likewise.
1007 (ppc64_elf_check_relocs): Set above fields.
1008 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1009 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1010 when possible.
1011
1012 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1013
1014 PR ld/24486
1015 * elflink.c (elf_link_output_extsym): Don't complain undefined
1016 weak dynamic reference.
1017
1018 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1019
1020 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1021 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1022 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1023 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1024 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1025 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1026 (elfNN_aarch64_small_plt0_bti_entry): Update.
1027 (elfNN_aarch64_small_plt_bti_entry): Update.
1028 (elfNN_aarch64_small_plt_pac_entry): Update.
1029 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1030 (setup_plt_values): Setup new entries.
1031 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1032 (elfNN_aarch64_plt_sym_val): Likewise.
1033
1034 2019-04-22 Jim Wilson <jimw@sifive.com>
1035
1036 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1037
1038 2019-04-19 Alan Modra <amodra@gmail.com>
1039
1040 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1041
1042 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1043
1044 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1045 building shared object.
1046 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1047
1048 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1049
1050 PR ld/24458
1051 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1052 linker_def.
1053
1054 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1055
1056 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1057 relocation.
1058 * bfd-in2.h: Regenerate.
1059 * libbfd.h: Likewise.
1060
1061 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1062
1063 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1064 * bfd-in2.h: Regenerated.
1065 * libbfd.h: Regenerated.
1066
1067 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1068
1069 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1070 * bfd-in2.h: Regenerated.
1071 * libbfd.h: Likewise.
1072
1073 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1074
1075 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1076 * bfd-in2.h: Regenerated.
1077 * libbfd.h: Regenerated.
1078 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1079 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1080 and R_ARM_THM_BF12 together.
1081 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1082
1083 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1084
1085 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1086 * libbfd.h: Regenerated.
1087 * bfd-in2.h: Regenerated.
1088 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1089 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1090 and R_ARM_THM_BF18 together.
1091 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1092
1093 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1094
1095 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1096 * bfd-in2.h: Regenerated.
1097 * libbfd.h: Regenerated.
1098 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1099 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1100 and R_ARM_THM_BF16 together.
1101 (get_value_helper): New reloc helper.
1102 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1103
1104 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1105
1106 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1107 * bfd-in2.h: Regenerate.
1108 * libbfd.h: Regenerate.
1109
1110 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1111
1112 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1113 * bfd-in2.h: Regenerate.
1114 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1115 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1116 and update assert.
1117 (using_thumb2): Likewise.
1118 (using_thumb2_bl): Update assert.
1119 (arch_has_arm_nop): Likewise.
1120 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1121 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1122
1123 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 * elf-linker-x86.h (elf_x86_cet_report): New.
1126 (elf_linker_x86_params): Add cet_report.
1127 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1128 missing IBT and SHSTK properties if needed.
1129
1130 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1131
1132 PR ld/24436
1133 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1134 "h != NULL". Don't check "h != NULL" before calling.
1135 bfd_elf_gc_record_vtentry.
1136 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1137 * elf32-bfin.c (bfin_check_relocs): Likewise.
1138 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1139 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1140 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1141 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1142 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1143 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1144 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1145 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1146 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1147 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1148 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1149 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1150 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1151 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1152 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1153 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1154 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1155 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1156 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1157 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1158 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1159 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1160 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1161 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1162 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1163 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1164 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1165 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1166 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1167 VTENTRY entry.
1168
1169 2019-04-11 Alan Modra <amodra@gmail.com>
1170
1171 PR 24435
1172 * elflink.c (elf_link_add_object_symbols): Don't read partial
1173 dynamic entries from fuzzed objects.
1174
1175 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1176
1177 PR ld/24302
1178 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1179 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1180 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1181
1182 2019-04-10 Michael Forney <mforney@mforney.org>
1183
1184 PR 24427
1185 * doc/chew.c (free_words): Correctly free "push_text" strings.
1186
1187 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1188
1189 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1190
1191 2019-04-08 Alan Modra <amodra@gmail.com>
1192
1193 * configure.ac (elfxx_x86): Define and use.
1194 * configure: Regenerate.
1195
1196 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1197
1198 * elf-linker-x86.h: New file.
1199 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1200 to get x86-specific linker options.
1201 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1202 (elf_x86_64_check_relocs): Likewise.
1203 (elf_x86_64_relocate_section): Likewise.
1204 (elf_x86_64_link_setup_gnu_properties): Likewise.
1205 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1206 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1207 (_bfd_elf_linker_x86_set_options): New function.
1208 * elfxx-x86.h: Include "elf-linker-x86.h".
1209 (elf_x86_link_hash_table): Add params.
1210
1211 2019-04-03 Alan Modra <amodra@gmail.com>
1212
1213 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1214 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1215 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1216 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1217 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1218 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1219
1220 2019-04-02 Jim Wilson <jimw@sifive.com>
1221
1222 PR 24389
1223 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1224 ELF header flags to after check for ELF object file. Loop through
1225 sections looking for code sections, if none, then skip ABI checks.
1226
1227 2019-03-30 Andrew Waterman <andrew@sifive.com>
1228
1229 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1230 rd == X_RA case.
1231
1232 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1233
1234 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1235 info->export_dynamic to the conditional.
1236
1237 2019-03-28 Alan Modra <amodra@gmail.com>
1238
1239 PR 24392
1240 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1241 * configure: Regenerate.
1242 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1243 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1244 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1245 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1246 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1247
1248 2019-03-21 Jim Wilson <jimw@sifive.com>
1249
1250 PR 24365
1251 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1252 verify sym non-NULL before using. Add identical check using h.
1253
1254 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1255
1256 * elf-bfd.h (struct elf_backend_data): Add argument to
1257 merge_gnu_properties.
1258 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1259 itself and while calling bed->merge_gnu_properties.
1260 (elf_merge_gnu_property_list): Update the calls for
1261 elf_merge_gnu_properties.
1262 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1263 of --force-bti warning and add argument.
1264 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1265 warning.
1266 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1267 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1268 declaration.
1269
1270 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1271
1272 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1273 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1274 (elf_backend_fixup_gnu_properties): Define for AArch64.
1275
1276 2019-03-18 Alan Modra <amodra@gmail.com>
1277
1278 PR 24355
1279 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1280 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1281 attempt at writing glink stubs only once.
1282
1283 2019-03-16 Alan Modra <amodra@gmail.com>
1284
1285 PR 24337
1286 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1287 (_bfd_elf_rel_local_sym): Likewise.
1288 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1289 section of symbols with unrecognized shndx.
1290
1291 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1292
1293 PR ld/24267
1294 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1295 section.
1296 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1297 in discarded section.
1298
1299 2019-03-15 Alan Modra <amodra@gmail.com>
1300
1301 PR 24339
1302 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1303 symbol after globals if elf_bad_symtab is not set.
1304
1305 2019-03-15 Alan Modra <amodra@gmail.com>
1306
1307 PR 24337
1308 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1309 (_bfd_elf_rel_local_sym): Likewise.
1310
1311 2019-03-15 Alan Modra <amodra@gmail.com>
1312
1313 PR 24336
1314 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1315 object files with sh_size not a multiple of sh_entsize.
1316
1317 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 PR ld/24338
1320 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1321 input with bad relocation.
1322
1323 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1324
1325 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1326
1327 2019-03-14 Nick Clifton <nickc@redhat.com>
1328
1329 PR 24334
1330 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1331 (save_section_vma): Initialise field to the number of entries in
1332 the sec_vma table.
1333 (section_vma_same): Check that the number of entries in the
1334 sec_vma table matches the number of sections in the bfd.
1335
1336 2019-03-14 Nick Clifton <nickc@redhat.com>
1337
1338 PR 24333
1339 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1340 section owner pointer when adding the default symbol.
1341
1342 2019-03-14 Nick Clifton <nickc@redhat.com>
1343
1344 PR 24332
1345 * elflink.c (elf_link_add_object_symbols): Add new local variable
1346 extversym_end. Initialise it to point to the end of the version
1347 symbol table, if present. Check it when initialising and updating
1348 the ever pointer.
1349
1350 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1351
1352 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1353 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1354 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1355 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1356 and PLT_PAC_PLT.
1357 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1358 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1359 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1360
1361 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1362 Szabolcs Nagy <szabolcs.nagy@arm.com>
1363
1364 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1365 (aarch64_bti_pac_info): New.
1366 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1367 (bfd_elf32_aarch64_set_options): Likewise.
1368 * bfd-in2.h: Regenerate
1369 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1370 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1371 (elfNN_aarch64_small_plt0_bti_entry): New.
1372 (elfNN_aarch64_small_plt_bti_entry): New.
1373 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1374 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1375 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1376 tlsdesc_plt_entry_size fields.
1377 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1378 (setup_plt_values): New helper function.
1379 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1380 bti enable type.
1381 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1382 fixed macros.
1383 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1384 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1385 to plt stubs instead of fixed ones and update filling them according
1386 to the need for bti.
1387 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1388 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1389 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1390 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1391 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1392 is set.
1393 (bfd_elfNN_get_synthetic_symtab): Define.
1394 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1395 and mising BTI NOTE SECTION.
1396
1397
1398 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1399
1400 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1401 linker created inputs from merge.
1402 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1403 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1404 (elfNN_aarch64_link_setup_gnu_properties): New.
1405 (elfNN_aarch64_merge_gnu_properties): New.
1406 (elf_backend_setup_gnu_properties): Define for AArch64.
1407 (elf_backend_merge_gnu_properties): Likewise.
1408 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1409 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1410 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1411 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1412 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1413 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1414 (elf_backend_parse_gnu_properties): Define for AArch64.
1415
1416 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1417
1418 PR ld/24322
1419 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1420 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1421
1422 2019-03-12 Alan Modra <amodra@gmail.com>
1423
1424 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1425 nmemb parameter. Use bfd_alloc2.
1426 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1427 Delete assertion.
1428 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1429 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1430 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1431 doesn't overflow.
1432 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1433 (assign_section_numbers): Style fix.
1434 (swap_out_syms): Use bfd_malloc2.
1435 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1436 overflow.
1437 (_bfd_elf_make_empty_symbol): Style fix.
1438 (elfobj_grok_stapsdt_note_1): Formatting.
1439 * elfcode.h (elf_object_p): Use bfd_alloc2.
1440 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1441 (elf_slurp_symbol_table): Use bfd_zalloc2.
1442 (elf_slurp_reloc_table): Use bfd_alloc2.
1443 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1444 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1445 size calculation doesn't overflow.
1446 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1447 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1448 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1449
1450 2019-03-08 Alan Modra <amodra@gmail.com>
1451
1452 PR 24311
1453 * merge.c (merge_strings): Return secinfo. Don't pad section
1454 to alignment here.
1455 (_bfd_merge_sections): Pad section to alignment here, if input
1456 sections contributing to merged output all pad to alignment.
1457 Formatting.
1458
1459 2019-03-06 Nick Clifton <nickc@redhat.com>
1460
1461 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1462 table pointer.
1463 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1464 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1465
1466 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1467
1468 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1469 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1470
1471 PR 20113
1472 * elf32-s390.c (allocate_dynrelocs): Update comment.
1473
1474 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1475
1476 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1477
1478 2019-02-28 Nick Clifton <nickc@redhat.com>
1479
1480 PR 24273
1481 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1482 section that is not NUL terminated.
1483
1484 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1485
1486 PR ld/24276
1487 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1488 by linker when checking copy reloc on protected symbol.
1489
1490 2019-02-24 Alan Modra <amodra@gmail.com>
1491
1492 PR 24144
1493 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1494
1495 2019-02-20 Eric Tsai <erictsai@cadence.com>
1496
1497 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1498 sections between the call site and call destination and adjust
1499 call distance by the largest alignment.
1500
1501 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1502
1503 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1504 * elf.c (elfcore_grok_aarch_pauth): New function.
1505 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1506 (elfcore_write_aarch_pauth): New function.
1507 (elfcore_write_register_note): Check for AArch64 pauth section.
1508
1509 2019-02-20 Alan Modra <amodra@gmail.com>
1510
1511 PR 24225
1512 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1513 return value.
1514
1515 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1516
1517 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1518 Darwin hosts, not just or1k.
1519 * configure: Regenerate.
1520
1521 2019-02-20 Alan Modra <amodra@gmail.com>
1522
1523 PR 24236
1524 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1525 sentinel NUL to string buffer nearer to loop where it is used.
1526 Don't go past sentinel when scanning strings, and don't write
1527 NUL again.
1528 * archive.c (do_slurp_coff_armap): Simplify string handling to
1529 archive64.c style.
1530
1531 2019-02-19 Alan Modra <amodra@gmail.com>
1532
1533 PR 24235
1534 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1535 attempting to prevent read past end of section.
1536
1537 2019-02-18 Alan Modra <amodra@gmail.com>
1538
1539 PR 24225
1540 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1541 PRIx64 to generate warning messages. Print local sym names too.
1542
1543 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1544
1545 * elf32-arc (INIT_SYM_STRING): Delete.
1546 (FINI_SYM_STRING): Likewise.
1547 (init_str): Likewise.
1548 (fini_str): Likewise.
1549
1550 2019-02-08 Alan Modra <amodra@gmail.com>
1551
1552 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1553 for bss-plt" warning to make it an error.
1554
1555 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1556
1557 PR ld/18841
1558 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1559 reloc_class_ifunc for ifunc symbols.
1560 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1561
1562 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1563
1564 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1565 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1566
1567 2019-02-07 Nick Clifton <nickc@redhat.com>
1568
1569 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1570 into the definitely obsolete list.
1571
1572 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1573
1574 PR ld/24151
1575 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1576 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1577 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1578 relocations to ...
1579 (elf_x86_64_check_relocs): Here.
1580 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1581 to check if a symbol is defined in a non-shared object.
1582 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1583
1584 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1585
1586 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1587 of 'labs' (and fix GCC warning).
1588
1589 2019-01-25 Nick Clifton <nickc@redhat.com>
1590
1591 * po/ru.po: Updated Russian translation.
1592
1593 2019-01-23 Nick Clifton <nickc@redhat.com>
1594
1595 * po/fr.po: Updated French translation.
1596
1597 2019-01-21 Nick Clifton <nickc@redhat.com>
1598
1599 * po/pt.po: Updated Portuguese translation.
1600 * po/uk.po: Updated Ukranian translation.
1601
1602 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1603
1604 PR 24108
1605 * elf32-nds32.c (nds32_relocate_section): Add space between words
1606 in error message.
1607 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1608 error message.
1609 (riscv_i_or_e_p): Likewise.
1610 (riscv_merge_arch_attr_info): Likewise.
1611
1612 2019-01-19 Nick Clifton <nickc@redhat.com>
1613
1614 * version.m4: Reset to 2.32.51
1615 * configure: Regenerate.
1616 * po/bfd.pot: Regenerate.
1617
1618 2018-06-24 Nick Clifton <nickc@redhat.com>
1619
1620 2.32 branch created.
1621
1622 2019-01-16 Kito Cheng <kito@andestech.com>
1623
1624 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1625 for OBJ_ATTR_PROC.
1626
1627 2019-01-16 Kito Cheng <kito@andestech.com>
1628 Nelson Chu <nelson@andestech.com>
1629
1630 * elfnn-riscv.c (in_subsets): New.
1631 (out_subsets): Likewise.
1632 (merged_subsets): Likewise.
1633 (riscv_std_ext_p): Likewise.
1634 (riscv_non_std_ext_p): Likewise.
1635 (riscv_std_sv_ext_p): Likewise.
1636 (riscv_non_std_sv_ext_p): Likewise.
1637 (riscv_version_mismatch): Likewise.
1638 (riscv_i_or_e_p): Likewise.
1639 (riscv_merge_std_ext): Likewise.
1640 (riscv_merge_non_std_and_sv_ext): Likewise.
1641 (riscv_merge_arch_attr_info): Likewise.
1642 (riscv_merge_attributes): Likewise.
1643 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1644
1645 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1646 (elf_backend_obj_attrs_vendor): Define.
1647 (elf_backend_obj_attrs_section_type): Likewise.
1648 (elf_backend_obj_attrs_section): Likewise.
1649 (elf_backend_obj_attrs_arg_type): Define as
1650 riscv_elf_obj_attrs_arg_type.
1651 * elfxx-riscv.c (riscv_estimate_digit): New.
1652 (riscv_estimate_arch_strlen1): Likewise.
1653 (riscv_estimate_arch_strlen): Likewise.
1654 (riscv_arch_str1): Likewise.
1655 (riscv_arch_str): Likewise.
1656 * elfxx-riscv.h (riscv_arch_str): Declare.
1657
1658 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1659
1660 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1661 * libbfd.h: regen.
1662 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1663 source field. (md_apply_fix): Apply final fix
1664 to BFD_RELOC_S12Z_OPR.
1665 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1666
1667 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1668
1669 PR 20113
1670 * elf32-s390.c (allocate_dynrelocs): Update comment.
1671
1672 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1673
1674 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1675 * configure: Regenerate.
1676
1677 2019-01-08 Alan Modra <amodra@gmail.com>
1678
1679 PR 23699
1680 PR 24065
1681 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1682 address range.
1683
1684 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1685
1686 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1687 * bfd/bfd-in2.h: Regenerate.
1688 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1689 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1690
1691 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1692
1693 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1694 default target, little endian target is more suitable.
1695
1696 2019-01-04 Alan Modra <amodra@gmail.com>
1697
1698 PR 24061
1699 PR 21786
1700 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1701 adjust all callers.
1702 (EQ_VALUE_IN_FIELD): Likewise.
1703 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1704
1705 2019-01-01 Alan Modra <amodra@gmail.com>
1706
1707 Update year range in copyright notice of all files.
1708
1709 For older changes see ChangeLog-2018
1710 \f
1711 Copyright (C) 2019 Free Software Foundation, Inc.
1712
1713 Copying and distribution of this file, with or without modification,
1714 are permitted in any medium without royalty provided the copyright
1715 notice and this notice are preserved.
1716
1717 Local Variables:
1718 mode: change-log
1719 left-margin: 8
1720 fill-column: 74
1721 version-control: never
1722 End:
This page took 0.080382 seconds and 4 git commands to generate.