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