1 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
3 * elf-bfd.h (struct elf_backend_data): New members.
4 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
5 .gnu.hash section if necessary.
6 (struct collect_gnu_hash_codes): New member.
7 (elf_gnu_hash_process_symidx): New function name.
8 (elf_renumber_gnu_hash_syms): Ignore local and undefined
9 symbols. Record xlat location for every symbol which should have
11 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
12 dynamic section if necessary.
13 (GNU_HASH_SECTION_NAME): New define.
14 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
15 Update the section size info.
16 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
17 (struct mips_elf_link_hash_entry): New member.
18 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
20 (mips_elf_sort_hash_table): Initialize the pointer to the
22 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
23 translation table entry with the symbol dynindx.
24 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
25 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
27 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
29 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
31 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
32 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
34 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
35 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
36 (_bfd_mips_post_process_headers): Mark the ABI version as
37 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
38 but not a .hash section.
39 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
40 position in the translation table, associated with the hash
42 * elfxx-mips.h (literal_reloc_p): Define
43 elf_backend_record_xhash_symbol backend hook.
44 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
47 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
49 * elf64-bpf.c (bpf_elf_relocate_section): New function.
50 (bpf_elf_insn_disp_reloc): Delete function.
51 (elf_backend_relocate_section): Define.
53 2019-08-07 Alan Modra <amodra@gmail.com>
56 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
57 for overflow in expressions involving nsymz.
59 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
61 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
62 two pages in relro presence.
64 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
66 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
67 (get_wsr_lbeg_opcode): New functions.
68 (check_loop_aligned): Detect relaxed loops and adjust loop_len
69 and insn_len for the first actual instruction of the loop.
71 2019-07-30 Alan Modra <amodra@gmail.com>
74 * bfd.c (struct bfd): Add lto_slim_object flag.
75 * bfd-in2.h: Regenerate.
77 2019-07-29 Martin Liska <mliska@suse.cz>
80 * archive.c (_bfd_compute_and_write_armap): Come up with
81 report_plugin_err variable.
82 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
83 * elf.c (struct lto_section): New.
84 (_bfd_elf_make_section_from_shdr): Parse content of
85 .gnu_lto_.lto section.
86 * elflink.c: Report error for a missing LTO plugin.
87 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
89 2019-07-28 Alan Modra <amodra@gmail.com>
93 * elflink.c (elf_link_add_object_symbols): Report an informative
94 error on finding local symbols with index equal or greater than
95 symbol table sh_info. Correct comment. Allow such symbols in
96 dynamic objects. Abort on NULL section for symbol.
98 2019-07-26 Alan Modra <amodra@gmail.com>
100 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
101 (elf_linker): Don't define.
102 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
104 2019-07-25 YunQiang Su <syq@debian.org>
107 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
110 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
112 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
114 (reloc_type_to_name): Fix formating.
115 (arc_elf_object_p): Likewise.
116 (debug_arc_reloc): Likewise.
117 (arc_do_relocation): Likewise.
119 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
121 * elf32-arc.c (bfd_get_32_me): New function.
122 (bfd_put_32_me): Likewise.
123 (arc_elf_relax_section): Likewise.
124 (bfd_elf32_bfd_relax_section): Define.
126 2019-07-24 Alan Modra <amodra@gmail.com>
128 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
129 elf_backend_final_write_processing, don't pass linker arg.
130 (_bfd_elf_final_write_processing): Update prototype.
131 * elf.c (_bfd_elf_write_object_contents): Adjust call.
132 (_bfd_elf_final_write_processing): Return error on incompatible
133 OSABI and has_gnu_osabi. Remove linker arg.
134 * elf-nacl.h (nacl_final_write_processing): Update prototype.
135 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
136 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
137 (_bfd_mips_elf_final_write_processing): Likewise.
138 * elf-hppa.h (elf_hppa_final_write_processing): Return status
139 and remove linker arg.
140 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
141 * elf-nacl.c (nacl_final_write_processing): Likewise.
142 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
143 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
144 * elf32-arm.c (arm_final_write_processing): Likewise.
145 (elf32_arm_final_write_processing): Likewise.
146 (elf32_arm_nacl_final_write_processing): Likewise.
147 (elf32_arm_vxworks_final_write_processing): Likewise.
148 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
149 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
150 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
151 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
152 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
153 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
154 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
155 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
156 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
157 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
158 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
159 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
160 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
161 * elf32-ppc.c (ppc_final_write_processing): Likewise.
162 (ppc_elf_final_write_processing): Likewise.
163 (ppc_elf_vxworks_final_write_processing): Likewise.
164 * elf32-sparc.c (sparc_final_write_processing): Likewise.
165 (elf32_sparc_final_write_processing): Likewise.
166 (elf32_sparc_vxworks_final_write_processing): Likewise.
167 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
168 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
169 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
170 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
171 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
172 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
173 (_bfd_mips_elf_final_write_processing): Likewise.
175 2019-07-24 Alan Modra <amodra@gmail.com>
177 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
179 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
180 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
182 2019-07-24 Alan Modra <amodra@gmail.com>
184 * elf32-visium.c (visium_elf_post_process_headers): Don't set
185 EI_OSABI header byte here.
188 2019-07-23 Alan Modra <amodra@gmail.com>
190 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
191 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
192 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
193 when elf_gnu_osabi_mbind is set.
194 (_bfd_elf_map_sections_to_segments): Likewise.
195 (_bfd_elf_init_private_section_data): Likewise.
196 (_bfd_elf_final_write_processing): Update comment.
197 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
198 (elf_backend_special_sections): Define without .tbss for linux.
200 2019-07-23 Alan Modra <amodra@gmail.com>
202 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
203 Remove none, any, all enums.
204 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
205 (_bfd_elf_final_write_processing): Declare.
206 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
207 elf_backend_final_write_processing.
208 (_bfd_elf_post_process_headers): Move body of function to..
209 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
210 only when not already set. Adjust for rename.
211 * elfxx-target.h (elf_backend_final_write_processing): Default to
212 _bfd_elf_final_write_processing.
213 * elf-hppa.h (elf_hppa_final_write_processing): Call
214 _bfd_elf_final_write_processing.
215 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
216 * elf-nacl.c (nacl_final_write_processing): Likewise.
217 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
218 * elf32-arc.c (arc_elf_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-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
228 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
229 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
230 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
231 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
232 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
233 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
234 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
235 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
236 * elf32-arm.c (arm_final_write_processing): Split out from..
237 (elf32_arm_final_write_processing): ..here. Call
238 _bfd_elf_final_write_processing.
239 (elf32_arm_nacl_final_write_processing): Adjust.
240 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
241 (_bfd_mips_elf_final_write_processing): ..here. Call
242 _bfd_elf_final_write_processing.
243 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
244 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
245 * elf32-ppc.c (ppc_final_write_processing): Split out from..
246 (ppc_elf_final_write_processing): ..here. Call
247 _bfd_elf_final_write_processing.
248 (ppc_elf_vxworks_final_write_processing): Adjust.
249 * elf32-sparc.c (sparc_final_write_processing): Split out from..
250 (elf32_sparc_final_write_processing): ..here. Call
251 _bfd_elf_final_write_processing.
252 (elf32_sparc_vxworks_final_write_processing): Adjust.
253 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
254 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
255 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
256 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
257 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
258 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
259 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
260 * elflink.c (elf_link_add_object_symbols): Likewise.
261 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
264 2019-07-23 Omar Majid <omajid@redhat.com>
266 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
267 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
268 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
270 * peXXigen.c: Add comment about source of .NET magic numbers.
272 2019-07-19 Alan Modra <amodra@gmail.com>
274 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
275 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
276 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
277 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
278 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
279 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
280 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
281 (ppc64_elf_check_relocs): Support pcrel tls relocs.
282 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
283 * bfd-in2.h: Regenerate.
284 * libbfd.h: Regenerate.
286 2019-07-18 Alan Modra <amodra@gmail.com>
288 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
289 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
292 2019-07-18 Alan Modra <amodra@gmail.com>
294 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
295 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
297 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
298 tls_type vars unsigned int.
299 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
300 to select r_type edit.
302 2019-07-18 Alan Modra <amodra@gmail.com>
304 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
306 * elf64-ppc.c (TLS_GDIE): Likewise.
308 2019-07-18 Alan Modra <amodra@gmail.com>
310 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
311 range of tp-relative offsets.
313 2019-07-15 Alan Modra <amodra@gmail.com>
315 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
316 alias is no longer bfd_link_hash_defined, clear the alias.
318 2019-07-13 Alan Modra <amodra@gmail.com>
320 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
322 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
323 (_bfd_elf_init_2_index_sections): Likewise.
324 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
325 relocations for local TLS symbols, use STN_UNDEF as the relocation
327 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
328 leave TLS symbol value in the addend.
330 2019-07-08 Alan Modra <amodra@gmail.com>
333 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
334 size before reading first word.
336 2019-07-02 Nick Clifton <nickc@redhat.com>
339 * elf.c (is_debuginfo_file): New function.
340 (assign_file_positions_for_non_load_sections): Do not warn about
341 allocated sections outside of loadable segments if they are found
343 * elf-bfd.h (is_debuginfo_file): Prototype.
345 2019-07-02 Nick Clifton <nickc@redhat.com>
348 * compress.c (bfd_get_full_section_contents): Do not complain
349 about linker created sections that are larger than the file size.
351 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
353 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
354 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
356 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
358 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
360 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
361 sections when .text section contain secure entry functions
364 2019-07-01 Nick Clifton <nickc@redhat.com>
367 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
368 section VMA in the offset used to update exidx relocs.
370 2019-06-28 Nick Clifton <nickc@redhat.com>
373 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
374 large version reference section.
375 * compress.c (bfd_get_full_section_contents): Check for an
376 uncompressed section whose size is larger than the file size.
378 2019-06-28 Alan Modra <amodra@gmail.com>
380 * format.c (bfd_check_format_matches): Don't match plugin target
381 if another target matches. Expand comment.
382 * targets.c (_bfd_target_vector): Move plugin_vec after all other
383 non-corefile targets, outside !SELECT_VECS.
384 * config.bfd: Don't handle targ=plugin here.
385 * configure.ac: Don't add plugin to enable_targets or handle in
386 target loop setting selvecs and other target vars.
387 * configure: Regenerate.
389 2019-06-26 Nick Clifton <nickc@redhat.com>
392 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
393 messages for failures.
394 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
395 if returning an error value.
397 2019-06-25 Jan Beulich <jbeulich@suse.com>
399 * elf-properties.c (elf_find_and_remove_property): Rename last
400 parameter. Mention it in comment.
402 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
404 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
405 SEC_MERGE or SEC_CODE flags are set.
406 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
407 symtype consistently. Don't include sec_addr (sym_sec) in symval.
408 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
409 Add sec_addr (sym_sec) after handling merge sections.
411 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
414 * elf-properties.c (elf_merge_gnu_property_list): Remove the
415 property after reporting property removal.
417 2019-06-23 Alan Modra <amodra@gmail.com>
420 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
421 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
422 Reduce range of offsets allowed for other GOT relocs.
424 2019-06-23 Alan Modra <amodra@gmail.com>
427 * elfcode.h (elf_object_p): Warning fix.
429 2019-06-21 Alan Modra <amodra@gmail.com>
432 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
434 2019-06-19 Alan Modra <amodra@gmail.com>
437 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
438 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
440 2019-06-19 Alan Modra <amodra@gmail.com>
442 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
443 functions that require r2 valid to use local entry.
444 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
446 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
448 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
449 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
450 with elfNN_aarch64_allocate_local_dynrelocs.
452 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
454 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
456 2019-06-14 Alan Modra <amodra@gmail.com>
458 * Makefile.in: Regenerate.
459 * configure: Regenerate.
461 2019-06-14 Alan Modra <amodra@gmail.com>
463 * elf64-ppc.c: Fix comments involving paddi.
465 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
468 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
469 absent, or the bfd is not in the ELF formart.
470 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
472 2019-06-10 Christos Zoulas <christos@zoulas.com>
475 * elf.c (elfcore_make_auxv_note_section): New function.
476 (elfcore_grok_note): Use it.
477 (elfcore_grok_freebsd_note): Likewise.
478 (elfcore_grok_openbsd_note): Likewise.
479 (elfcore_grok_netbsd_note): Likewise. Plus add support for
480 NT_NETBSDCORE_AUXV notes.
482 2019-06-06 Sudakshina Das <sudi.das@arm.com>
484 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
485 alignment of the new gnu property section.
487 2019-06-06 Sudakshina Das <sudi.das@arm.com>
489 * bfd-in.h: Change comment.
490 * bfd-in2.h: Regenerate.
491 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
492 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
495 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
497 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
498 Remove overflow check.
500 2019-05-28 Alan Modra <amodra@gmail.com>
503 * cofflink.c (coff_link_check_archive_element): Don't assume
504 element is a coff object file after calling add_archive_element.
506 2019-05-28 Alan Modra <amodra@gmail.com>
509 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
510 attempt to set sh_entsize for excluded PLT section.
512 2019-05-28 Alan Modra <amodra@gmail.com>
515 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
516 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
517 allocated in alpha_dynamic_entries_for_reloc.
519 2019-05-28 Alan Modra <amodra@gmail.com>
522 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
523 on NULL output_section.
524 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
526 2019-05-28 Alan Modra <amodra@gmail.com>
529 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
530 entry when MUST_FIND. Abort when MUST_FIND not found.
531 (elf_m68k_get_bfd2got_entry): Likewise.
532 (elf_m68k_relocate_section): Remove now useless assert.
534 2019-05-28 Alan Modra <amodra@gmail.com>
537 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
538 from bfd_link_info, not an output section owner.
539 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
540 (elf_hppa_final_link_relocate): Likewise.
542 2019-05-28 Alan Modra <amodra@gmail.com>
545 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
546 create_object_symbols_section, obj_textsec, obj_datasec or
547 obj_bsssec. Fix other errors in placement.
548 * config.bfd: Obsolete tic30-aout.
550 2019-05-28 Alan Modra <amodra@gmail.com>
553 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
554 end of section list as well as section_count.
555 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
556 section list before returning error.
558 2019-05-27 Alan Modra <amodra@gmail.com>
560 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
562 2019-05-27 Alan Modra <amodra@gmail.com>
565 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
567 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
569 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
570 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
571 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
572 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
573 (elf_backend_merge_symbol_attribute): Define.
575 2019-05-24 Alan Modra <amodra@gmail.com>
577 * po/SRC-POTFILES.in: Regenerate.
579 2019-05-24 Alan Modra <amodra@gmail.com>
581 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
582 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
583 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
584 (struct ppc_link_hash_table): Add powerxx_stubs.
585 (ppc64_elf_check_relocs): Set powerxx_stubs.
586 (build_powerxx_offset, size_powerxx_offset),
587 (num_relocs_for_powerxx_offset),
588 (emit_relocs_for_powerxx_offset): New functions.
589 (plt_stub_size): Size powerxx stubs.
590 (ppc_build_one_stub): Emit powerxx stubs.
591 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
594 2019-05-24 Alan Modra <amodra@gmail.com>
596 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
598 (xlate_pcrel_opt): New function.
599 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
600 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
601 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
603 2019-05-24 Alan Modra <amodra@gmail.com>
605 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
606 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
607 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
608 (BFD_RELOC_PPC64_PLT_PCREL34),
609 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
610 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
611 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
612 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
613 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
614 * elf64-ppc.c (PNOP): Define.
615 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
616 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
617 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
619 (ppc64_elf_prefix_reloc): New function.
620 (struct ppc_link_hash_table): Add notoc_plt.
621 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
622 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
623 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
624 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
625 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
626 possible need for dynamic relocs on non-pcrel powerxx relocs.
627 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
628 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
629 (toc_adjusting_stub_needed): Likewise.
630 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
631 (ppc64_elf_relocate_section): Handle new powerxx relocs.
632 * bfd-in2.h: Regenerate.
633 * libbfd.h: Regenerate.
635 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
637 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
638 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
640 * configure: Regenerate.
642 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
644 * configure: Regenerated.
645 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
646 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
647 (BFD64_BACKENDS): Add elf64-bpf.lo.
648 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
649 * Makefile.in (SOURCE_HFILES): Regenerate.
650 * config.bfd (targ_cpu): Handle bpf-*-* targets.
651 * cpu-bpf.c: New file.
652 * elf64-bpf.c: Likewise.
653 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
655 * archures.c: Define architecture bfd_arch_bpf and machine
657 * reloc.c: Define BFD relocations used by the BPF target.
658 * bfd-in2.h: Regenerated.
659 * libbfd.h: Likewise.
661 2019-05-22 Alan Modra <amodra@gmail.com>
663 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
666 2019-05-22 Alan Modra <amodra@gmail.com>
668 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
669 processing on "size error in section".
671 2019-05-22 Alan Modra <amodra@gmail.com>
673 * som.c (som_bfd_free_cached_info): Call
674 _bfd_generic_close_and_cleanup.
676 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
678 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
679 for TLS_TPREL_HI16(/LO16) relocations in shared library.
681 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
683 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
684 checks. Search the RELA table for n64 relocations.
686 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
687 Faraz Shahbazker <fshahbazker@wavecomp.com>
689 * elfxx-mips.c (LA25_BC): New macro.
690 (mips_elf_link_hash_table)<compact_branches>: New field.
691 (STUB_JALRC): New macro.
692 (mipsr6_o32_exec_plt0_entry_compact): New array.
693 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
694 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
695 (mipsr6_exec_plt_entry_compact): Likewise.
696 (mips_elf_create_la25_stub): Use BC instead of J for stubs
697 when compact_branches is true.
698 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
699 PLT for MIPSR6 with compact_branches. Do not reorder the
700 compact branches PLT. Switch the lazy stub for MIPSR6
701 with compact_branches to use JALRC.
702 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
703 when compact_branches is true.
704 (_bfd_mips_elf_compact_branches): New function.
705 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
707 2019-05-21 Tamar Christina <tamar.christina@arm.com>
710 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
713 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
716 * elf32-arm.c (get_value_helper): Remove.
717 (elf32_arm_final_link_relocate): Fix branch future relocations.
719 2019-05-21 Tamar Christina <tamar.christina@arm.com>
722 * bfd-in.h (enum erratum_84319_opts): New
723 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
724 int to enum erratum_84319_opts.
725 * bfd-in2.h: Regenerate.
726 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
727 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
728 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
729 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
730 (_bfd_aarch64_resize_stubs): Amend comment.
731 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
733 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
734 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
736 (clear_erratum_843419_entry): Update erratum conditional.
738 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
741 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
742 when computing distance_short_enough.
744 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
747 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
748 Wrap around even if distance equals avr_pc_wrap_around.
750 2019-05-20 Nick Clifton <nickc@redhat.com>
752 * po/fr.po: Updated French translation.
754 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
756 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
758 2019-05-16 Alan Modra <amodra@gmail.com>
760 * elf32-arm.c (elf32_arm_write_section): Revert last change.
762 2019-05-15 Alan Modra <amodra@gmail.com>
764 * elf32-arm.c (elf32_arm_write_section): Don't leave
765 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
766 unitialised section contents.
768 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
771 * verilog.c: (VerilogDataWidth): New variable.
772 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
774 2019-05-08 Nick Clifton <nickc@redhat.com>
777 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
778 rather than FALSE if encountering a non-ELF file.
780 2019-05-06 Alan Modra <amodra@gmail.com>
782 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
784 2019-05-06 Alan Modra <amodra@gmail.com>
786 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
787 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
788 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
789 * libbfd.h: Regenerate.
790 * bfd-in2.h: Regenerate.
792 2019-05-04 Alan Modra <amodra@gmail.com>
795 * syms.c (coff_section_type): Only allow '.', '$' and numeric
796 following the standard section names.
797 (bfd_decode_symclass): Prioritize section flag tests in
798 decode_section_type before name tests in coff_section_type.
799 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
800 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
801 their names and choose standard .text section flags for
804 2019-05-02 Nick Clifton <nickc@redhat.com>
807 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
808 .gnu.debugaltlink sections as debugging sections.
810 2019-04-30 Alan Modra <amodra@gmail.com>
812 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
813 (struct _ppc64_elf_section_data): Likewise.
814 (ppc64_elf_check_relocs): Set above fields.
815 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
816 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
819 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
822 * elflink.c (elf_link_output_extsym): Don't complain undefined
823 weak dynamic reference.
825 2019-04-25 Sudakshina Das <sudi.das@arm.com>
827 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
828 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
829 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
830 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
831 (elfNN_aarch64_small_plt0_pac_entry): Remove.
832 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
833 (elfNN_aarch64_small_plt0_bti_entry): Update.
834 (elfNN_aarch64_small_plt_bti_entry): Update.
835 (elfNN_aarch64_small_plt_pac_entry): Update.
836 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
837 (setup_plt_values): Setup new entries.
838 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
839 (elfNN_aarch64_plt_sym_val): Likewise.
841 2019-04-22 Jim Wilson <jimw@sifive.com>
843 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
845 2019-04-19 Alan Modra <amodra@gmail.com>
847 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
849 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
851 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
852 building shared object.
853 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
855 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
858 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
861 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
863 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
865 * bfd-in2.h: Regenerate.
866 * libbfd.h: Likewise.
868 2019-04-15 Sudakshina Das <sudi.das@arm.com>
870 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
871 * bfd-in2.h: Regenerated.
872 * libbfd.h: Regenerated.
874 2019-04-15 Sudakshina Das <sudi.das@arm.com>
876 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
877 * bfd-in2.h: Regenerated.
878 * libbfd.h: Likewise.
880 2019-04-15 Sudakshina Das <sudi.das@arm.com>
882 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
883 * bfd-in2.h: Regenerated.
884 * libbfd.h: Regenerated.
885 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
886 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
887 and R_ARM_THM_BF12 together.
888 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
890 2019-04-15 Sudakshina Das <sudi.das@arm.com>
892 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
893 * libbfd.h: Regenerated.
894 * bfd-in2.h: Regenerated.
895 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
896 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
897 and R_ARM_THM_BF18 together.
898 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
900 2019-04-15 Sudakshina Das <sudi.das@arm.com>
902 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
903 * bfd-in2.h: Regenerated.
904 * libbfd.h: Regenerated.
905 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
906 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
907 and R_ARM_THM_BF16 together.
908 (get_value_helper): New reloc helper.
909 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
911 2019-04-15 Sudakshina Das <sudi.das@arm.com>
913 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
914 * bfd-in2.h: Regenerate.
915 * libbfd.h: Regenerate.
917 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
919 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
920 * bfd-in2.h: Regenerate.
921 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
922 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
924 (using_thumb2): Likewise.
925 (using_thumb2_bl): Update assert.
926 (arch_has_arm_nop): Likewise.
927 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
928 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
930 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
932 * elf-linker-x86.h (elf_x86_cet_report): New.
933 (elf_linker_x86_params): Add cet_report.
934 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
935 missing IBT and SHSTK properties if needed.
937 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
940 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
941 "h != NULL". Don't check "h != NULL" before calling.
942 bfd_elf_gc_record_vtentry.
943 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
944 * elf32-bfin.c (bfin_check_relocs): Likewise.
945 * elf32-cris.c (cris_elf_check_relocs): Likewise.
946 * elf32-csky.c (csky_elf_check_relocs): Likewise.
947 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
948 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
949 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
950 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
951 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
952 * elf32-i386.c (elf_i386_check_relocs): Likewise.
953 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
954 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
955 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
956 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
957 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
958 * elf32-metag.c (elf_metag_check_relocs): Likewise.
959 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
960 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
961 * elf32-s390.c (elf_s390_check_relocs): Likewise.
962 * elf32-sh.c (sh_elf_check_relocs): Likewise.
963 * elf32-v850.c (v850_elf_check_relocs): Likewise.
964 * elf32-vax.c (elf_vax_check_relocs): Likewise.
965 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
966 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
967 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
968 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
969 * elf64-s390.c (elf_s390_check_relocs): Likewise.
970 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
971 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
972 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
973 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
976 2019-04-11 Alan Modra <amodra@gmail.com>
979 * elflink.c (elf_link_add_object_symbols): Don't read partial
980 dynamic entries from fuzzed objects.
982 2019-04-11 Tamar Christina <tamar.christina@arm.com>
985 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
986 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
987 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
989 2019-04-10 Michael Forney <mforney@mforney.org>
992 * doc/chew.c (free_words): Correctly free "push_text" strings.
994 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
996 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
998 2019-04-08 Alan Modra <amodra@gmail.com>
1000 * configure.ac (elfxx_x86): Define and use.
1001 * configure: Regenerate.
1003 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1005 * elf-linker-x86.h: New file.
1006 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1007 to get x86-specific linker options.
1008 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1009 (elf_x86_64_check_relocs): Likewise.
1010 (elf_x86_64_relocate_section): Likewise.
1011 (elf_x86_64_link_setup_gnu_properties): Likewise.
1012 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1013 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1014 (_bfd_elf_linker_x86_set_options): New function.
1015 * elfxx-x86.h: Include "elf-linker-x86.h".
1016 (elf_x86_link_hash_table): Add params.
1018 2019-04-03 Alan Modra <amodra@gmail.com>
1020 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1021 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1022 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1023 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1024 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1025 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1027 2019-04-02 Jim Wilson <jimw@sifive.com>
1030 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1031 ELF header flags to after check for ELF object file. Loop through
1032 sections looking for code sections, if none, then skip ABI checks.
1034 2019-03-30 Andrew Waterman <andrew@sifive.com>
1036 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1039 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1041 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1042 info->export_dynamic to the conditional.
1044 2019-03-28 Alan Modra <amodra@gmail.com>
1047 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1048 * configure: Regenerate.
1049 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1050 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1051 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1052 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1053 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1055 2019-03-21 Jim Wilson <jimw@sifive.com>
1058 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1059 verify sym non-NULL before using. Add identical check using h.
1061 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1063 * elf-bfd.h (struct elf_backend_data): Add argument to
1064 merge_gnu_properties.
1065 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1066 itself and while calling bed->merge_gnu_properties.
1067 (elf_merge_gnu_property_list): Update the calls for
1068 elf_merge_gnu_properties.
1069 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1070 of --force-bti warning and add argument.
1071 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1073 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1074 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1077 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1079 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1080 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1081 (elf_backend_fixup_gnu_properties): Define for AArch64.
1083 2019-03-18 Alan Modra <amodra@gmail.com>
1086 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1087 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1088 attempt at writing glink stubs only once.
1090 2019-03-16 Alan Modra <amodra@gmail.com>
1093 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1094 (_bfd_elf_rel_local_sym): Likewise.
1095 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1096 section of symbols with unrecognized shndx.
1098 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1101 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1103 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1104 in discarded section.
1106 2019-03-15 Alan Modra <amodra@gmail.com>
1109 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1110 symbol after globals if elf_bad_symtab is not set.
1112 2019-03-15 Alan Modra <amodra@gmail.com>
1115 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1116 (_bfd_elf_rel_local_sym): Likewise.
1118 2019-03-15 Alan Modra <amodra@gmail.com>
1121 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1122 object files with sh_size not a multiple of sh_entsize.
1124 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1127 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1128 input with bad relocation.
1130 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1132 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1134 2019-03-14 Nick Clifton <nickc@redhat.com>
1137 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1138 (save_section_vma): Initialise field to the number of entries in
1140 (section_vma_same): Check that the number of entries in the
1141 sec_vma table matches the number of sections in the bfd.
1143 2019-03-14 Nick Clifton <nickc@redhat.com>
1146 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1147 section owner pointer when adding the default symbol.
1149 2019-03-14 Nick Clifton <nickc@redhat.com>
1152 * elflink.c (elf_link_add_object_symbols): Add new local variable
1153 extversym_end. Initialise it to point to the end of the version
1154 symbol table, if present. Check it when initialising and updating
1157 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1159 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1160 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1161 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1162 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1164 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1165 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1166 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1168 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1169 Szabolcs Nagy <szabolcs.nagy@arm.com>
1171 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1172 (aarch64_bti_pac_info): New.
1173 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1174 (bfd_elf32_aarch64_set_options): Likewise.
1175 * bfd-in2.h: Regenerate
1176 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1177 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1178 (elfNN_aarch64_small_plt0_bti_entry): New.
1179 (elfNN_aarch64_small_plt_bti_entry): New.
1180 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1181 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1182 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1183 tlsdesc_plt_entry_size fields.
1184 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1185 (setup_plt_values): New helper function.
1186 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1188 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1190 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1191 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1192 to plt stubs instead of fixed ones and update filling them according
1193 to the need for bti.
1194 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1195 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1196 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1197 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1198 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1200 (bfd_elfNN_get_synthetic_symtab): Define.
1201 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1202 and mising BTI NOTE SECTION.
1205 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1207 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1208 linker created inputs from merge.
1209 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1210 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1211 (elfNN_aarch64_link_setup_gnu_properties): New.
1212 (elfNN_aarch64_merge_gnu_properties): New.
1213 (elf_backend_setup_gnu_properties): Define for AArch64.
1214 (elf_backend_merge_gnu_properties): Likewise.
1215 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1216 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1217 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1218 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1219 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1220 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1221 (elf_backend_parse_gnu_properties): Define for AArch64.
1223 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1226 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1227 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1229 2019-03-12 Alan Modra <amodra@gmail.com>
1231 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1232 nmemb parameter. Use bfd_alloc2.
1233 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1235 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1236 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1237 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1239 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1240 (assign_section_numbers): Style fix.
1241 (swap_out_syms): Use bfd_malloc2.
1242 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1244 (_bfd_elf_make_empty_symbol): Style fix.
1245 (elfobj_grok_stapsdt_note_1): Formatting.
1246 * elfcode.h (elf_object_p): Use bfd_alloc2.
1247 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1248 (elf_slurp_symbol_table): Use bfd_zalloc2.
1249 (elf_slurp_reloc_table): Use bfd_alloc2.
1250 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1251 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1252 size calculation doesn't overflow.
1253 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1254 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1255 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1257 2019-03-08 Alan Modra <amodra@gmail.com>
1260 * merge.c (merge_strings): Return secinfo. Don't pad section
1262 (_bfd_merge_sections): Pad section to alignment here, if input
1263 sections contributing to merged output all pad to alignment.
1266 2019-03-06 Nick Clifton <nickc@redhat.com>
1268 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1270 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1271 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1273 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1275 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1276 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1279 * elf32-s390.c (allocate_dynrelocs): Update comment.
1281 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1283 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1285 2019-02-28 Nick Clifton <nickc@redhat.com>
1288 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1289 section that is not NUL terminated.
1291 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1294 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1295 by linker when checking copy reloc on protected symbol.
1297 2019-02-24 Alan Modra <amodra@gmail.com>
1300 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1302 2019-02-20 Eric Tsai <erictsai@cadence.com>
1304 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1305 sections between the call site and call destination and adjust
1306 call distance by the largest alignment.
1308 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1310 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1311 * elf.c (elfcore_grok_aarch_pauth): New function.
1312 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1313 (elfcore_write_aarch_pauth): New function.
1314 (elfcore_write_register_note): Check for AArch64 pauth section.
1316 2019-02-20 Alan Modra <amodra@gmail.com>
1319 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1322 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1324 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1325 Darwin hosts, not just or1k.
1326 * configure: Regenerate.
1328 2019-02-20 Alan Modra <amodra@gmail.com>
1331 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1332 sentinel NUL to string buffer nearer to loop where it is used.
1333 Don't go past sentinel when scanning strings, and don't write
1335 * archive.c (do_slurp_coff_armap): Simplify string handling to
1338 2019-02-19 Alan Modra <amodra@gmail.com>
1341 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1342 attempting to prevent read past end of section.
1344 2019-02-18 Alan Modra <amodra@gmail.com>
1347 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1348 PRIx64 to generate warning messages. Print local sym names too.
1350 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1352 * elf32-arc (INIT_SYM_STRING): Delete.
1353 (FINI_SYM_STRING): Likewise.
1354 (init_str): Likewise.
1355 (fini_str): Likewise.
1357 2019-02-08 Alan Modra <amodra@gmail.com>
1359 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1360 for bss-plt" warning to make it an error.
1362 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1365 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1366 reloc_class_ifunc for ifunc symbols.
1367 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1369 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1371 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1372 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1374 2019-02-07 Nick Clifton <nickc@redhat.com>
1376 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1377 into the definitely obsolete list.
1379 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1382 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1383 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1384 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1386 (elf_x86_64_check_relocs): Here.
1387 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1388 to check if a symbol is defined in a non-shared object.
1389 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1391 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1393 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1394 of 'labs' (and fix GCC warning).
1396 2019-01-25 Nick Clifton <nickc@redhat.com>
1398 * po/ru.po: Updated Russian translation.
1400 2019-01-23 Nick Clifton <nickc@redhat.com>
1402 * po/fr.po: Updated French translation.
1404 2019-01-21 Nick Clifton <nickc@redhat.com>
1406 * po/pt.po: Updated Portuguese translation.
1407 * po/uk.po: Updated Ukranian translation.
1409 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1412 * elf32-nds32.c (nds32_relocate_section): Add space between words
1414 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1416 (riscv_i_or_e_p): Likewise.
1417 (riscv_merge_arch_attr_info): Likewise.
1419 2019-01-19 Nick Clifton <nickc@redhat.com>
1421 * version.m4: Reset to 2.32.51
1422 * configure: Regenerate.
1423 * po/bfd.pot: Regenerate.
1425 2018-06-24 Nick Clifton <nickc@redhat.com>
1427 2.32 branch created.
1429 2019-01-16 Kito Cheng <kito@andestech.com>
1431 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1434 2019-01-16 Kito Cheng <kito@andestech.com>
1435 Nelson Chu <nelson@andestech.com>
1437 * elfnn-riscv.c (in_subsets): New.
1438 (out_subsets): Likewise.
1439 (merged_subsets): Likewise.
1440 (riscv_std_ext_p): Likewise.
1441 (riscv_non_std_ext_p): Likewise.
1442 (riscv_std_sv_ext_p): Likewise.
1443 (riscv_non_std_sv_ext_p): Likewise.
1444 (riscv_version_mismatch): Likewise.
1445 (riscv_i_or_e_p): Likewise.
1446 (riscv_merge_std_ext): Likewise.
1447 (riscv_merge_non_std_and_sv_ext): Likewise.
1448 (riscv_merge_arch_attr_info): Likewise.
1449 (riscv_merge_attributes): Likewise.
1450 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1452 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1453 (elf_backend_obj_attrs_vendor): Define.
1454 (elf_backend_obj_attrs_section_type): Likewise.
1455 (elf_backend_obj_attrs_section): Likewise.
1456 (elf_backend_obj_attrs_arg_type): Define as
1457 riscv_elf_obj_attrs_arg_type.
1458 * elfxx-riscv.c (riscv_estimate_digit): New.
1459 (riscv_estimate_arch_strlen1): Likewise.
1460 (riscv_estimate_arch_strlen): Likewise.
1461 (riscv_arch_str1): Likewise.
1462 (riscv_arch_str): Likewise.
1463 * elfxx-riscv.h (riscv_arch_str): Declare.
1465 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1467 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1469 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1470 source field. (md_apply_fix): Apply final fix
1471 to BFD_RELOC_S12Z_OPR.
1472 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1474 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1477 * elf32-s390.c (allocate_dynrelocs): Update comment.
1479 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1481 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1482 * configure: Regenerate.
1484 2019-01-08 Alan Modra <amodra@gmail.com>
1488 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1491 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1493 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1494 * bfd/bfd-in2.h: Regenerate.
1495 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1496 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1498 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1500 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1501 default target, little endian target is more suitable.
1503 2019-01-04 Alan Modra <amodra@gmail.com>
1507 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1509 (EQ_VALUE_IN_FIELD): Likewise.
1510 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1512 2019-01-01 Alan Modra <amodra@gmail.com>
1514 Update year range in copyright notice of all files.
1516 For older changes see ChangeLog-2018
1518 Copyright (C) 2019 Free Software Foundation, Inc.
1520 Copying and distribution of this file, with or without modification,
1521 are permitted in any medium without royalty provided the copyright
1522 notice and this notice are preserved.
1528 version-control: never