]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
SHF_GNU_MBIND requires ELFOSABI_GNU
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
df3a023b
AM
12019-07-23 Alan Modra <amodra@gmail.com>
2
3 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
4 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
5 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
6 when elf_gnu_osabi_mbind is set.
7 (_bfd_elf_map_sections_to_segments): Likewise.
8 (_bfd_elf_init_private_section_data): Likewise.
9 (_bfd_elf_final_write_processing): Update comment.
10 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
11 (elf_backend_special_sections): Define without .tbss for linux.
12
06f44071
AM
132019-07-23 Alan Modra <amodra@gmail.com>
14
15 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
16 Remove none, any, all enums.
17 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
18 (_bfd_elf_final_write_processing): Declare.
19 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
20 elf_backend_final_write_processing.
21 (_bfd_elf_post_process_headers): Move body of function to..
22 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
23 only when not already set. Adjust for rename.
24 * elfxx-target.h (elf_backend_final_write_processing): Default to
25 _bfd_elf_final_write_processing.
26 * elf-hppa.h (elf_hppa_final_write_processing): Call
27 _bfd_elf_final_write_processing.
28 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
29 * elf-nacl.c (nacl_final_write_processing): Likewise.
30 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
31 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
32 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
33 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
34 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
35 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
36 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
37 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
38 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
39 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
40 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
41 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
42 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
43 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
44 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
45 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
46 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
47 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
48 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
49 * elf32-arm.c (arm_final_write_processing): Split out from..
50 (elf32_arm_final_write_processing): ..here. Call
51 _bfd_elf_final_write_processing.
52 (elf32_arm_nacl_final_write_processing): Adjust.
53 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
54 (_bfd_mips_elf_final_write_processing): ..here. Call
55 _bfd_elf_final_write_processing.
56 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
57 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
58 * elf32-ppc.c (ppc_final_write_processing): Split out from..
59 (ppc_elf_final_write_processing): ..here. Call
60 _bfd_elf_final_write_processing.
61 (ppc_elf_vxworks_final_write_processing): Adjust.
62 * elf32-sparc.c (sparc_final_write_processing): Split out from..
63 (elf32_sparc_final_write_processing): ..here. Call
64 _bfd_elf_final_write_processing.
65 (elf32_sparc_vxworks_final_write_processing): Adjust.
66 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
67 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
68 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
69 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
70 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
71 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
72 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
73 * elflink.c (elf_link_add_object_symbols): Likewise.
74 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
75 instead.
76
1dd1bc4d
OM
772019-07-23 Omar Majid <omajid@redhat.com>
78
79 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
80 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
81 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
82 AMD64_NETBSD_MAGIC.
83 * peXXigen.c: Add comment about source of .NET magic numbers.
84
c213164a
AM
852019-07-19 Alan Modra <amodra@gmail.com>
86
87 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
88 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
89 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
90 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
91 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
92 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
93 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
94 (ppc64_elf_check_relocs): Support pcrel tls relocs.
95 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
96 * bfd-in2.h: Regenerate.
97 * libbfd.h: Regenerate.
98
71c4e95a
AM
992019-07-18 Alan Modra <amodra@gmail.com>
100
101 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
102 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
103 match test.
104
46e9995a
AM
1052019-07-18 Alan Modra <amodra@gmail.com>
106
107 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
108 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
109 is more than 8 bits.
110 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
111 tls_type vars unsigned int.
112 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
113 to select r_type edit.
114
b00a0a86
AM
1152019-07-18 Alan Modra <amodra@gmail.com>
116
117 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
118 Correct comment.
119 * elf64-ppc.c (TLS_GDIE): Likewise.
120
0b147428
AM
1212019-07-18 Alan Modra <amodra@gmail.com>
122
123 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
124 range of tp-relative offsets.
125
5b9d7a9a
AM
1262019-07-15 Alan Modra <amodra@gmail.com>
127
128 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
129 alias is no longer bfd_link_hash_defined, clear the alias.
130
f26a3287
AM
1312019-07-13 Alan Modra <amodra@gmail.com>
132
133 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
134 tls_sec.
135 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
136 (_bfd_elf_init_2_index_sections): Likewise.
137 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
138 relocations for local TLS symbols, use STN_UNDEF as the relocation
139 symbol.
140 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
141 leave TLS symbol value in the addend.
142
62a47958
AM
1432019-07-08 Alan Modra <amodra@gmail.com>
144
145 PR 24785
146 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
147 size before reading first word.
148
1faa385f
NC
1492019-07-02 Nick Clifton <nickc@redhat.com>
150
151 PR 24717
152 * elf.c (is_debuginfo_file): New function.
153 (assign_file_positions_for_non_load_sections): Do not warn about
154 allocated sections outside of loadable segments if they are found
155 in a debuginfo file.
156 * elf-bfd.h (is_debuginfo_file): Prototype.
157
125f83f6
NC
1582019-07-02 Nick Clifton <nickc@redhat.com>
159
160 PR 24753
161 * compress.c (bfd_get_full_section_contents): Do not complain
162 about linker created sections that are larger than the file size.
163
4d83e8d9
CL
1642019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
165
166 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
167 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
168 for CMSE stubs.
169 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
170
bb32413f
SP
1712019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
172
173 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
174 sections when .text section contain secure entry functions
175 is marked.
176
539300fb
NC
1772019-07-01 Nick Clifton <nickc@redhat.com>
178
179 PR 23839
180 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
181 section VMA in the offset used to update exidx relocs.
182
7e56c51c
NC
1832019-06-28 Nick Clifton <nickc@redhat.com>
184
185 PR 24708
186 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
187 large version reference section.
188 * compress.c (bfd_get_full_section_contents): Check for an
189 uncompressed section whose size is larger than the file size.
190
999d6dff
AM
1912019-06-28 Alan Modra <amodra@gmail.com>
192
193 * format.c (bfd_check_format_matches): Don't match plugin target
194 if another target matches. Expand comment.
195 * targets.c (_bfd_target_vector): Move plugin_vec after all other
196 non-corefile targets, outside !SELECT_VECS.
197 * config.bfd: Don't handle targ=plugin here.
198 * configure.ac: Don't add plugin to enable_targets or handle in
199 target loop setting selvecs and other target vars.
200 * configure: Regenerate.
201
a68aa5d3
NC
2022019-06-26 Nick Clifton <nickc@redhat.com>
203
204 PR 24703
205 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
206 messages for failures.
207 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
208 if returning an error value.
209
ab9f654c
JB
2102019-06-25 Jan Beulich <jbeulich@suse.com>
211
212 * elf-properties.c (elf_find_and_remove_property): Rename last
213 parameter. Mention it in comment.
214
04b865dc
JW
2152019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
216
217 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
218 SEC_MERGE or SEC_CODE flags are set.
219 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
220 symtype consistently. Don't include sec_addr (sym_sec) in symval.
221 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
222 Add sec_addr (sym_sec) after handling merge sections.
223
f93ab3a0
L
2242019-06-24 H.J. Lu <hongjiu.lu@intel.com>
225
226 PR ld/24721
227 * elf-properties.c (elf_merge_gnu_property_list): Remove the
228 property after reporting property removal.
229
bb22a418
AM
2302019-06-23 Alan Modra <amodra@gmail.com>
231
232 PR 24704
233 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
234 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
235 Reduce range of offsets allowed for other GOT relocs.
236
14b2a8e4
AM
2372019-06-23 Alan Modra <amodra@gmail.com>
238
239 PR 24689
240 * elfcode.h (elf_object_p): Warning fix.
241
890f750a
AM
2422019-06-21 Alan Modra <amodra@gmail.com>
243
244 PR 24689
245 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
246
6f5601c4
AM
2472019-06-19 Alan Modra <amodra@gmail.com>
248
249 PR 24697
250 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
251 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
252
4a4e7361
AM
2532019-06-19 Alan Modra <amodra@gmail.com>
254
255 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
256 functions that require r2 valid to use local entry.
257 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
258
39c05d94
SN
2592019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
260
261 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
262 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
263 with elfNN_aarch64_allocate_local_dynrelocs.
264
e30d1fa1
SN
2652019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
266
267 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
268
3a3a077c
AM
2692019-06-14 Alan Modra <amodra@gmail.com>
270
271 * Makefile.in: Regenerate.
272 * configure: Regenerate.
273
d4b87b1e
AM
2742019-06-14 Alan Modra <amodra@gmail.com>
275
276 * elf64-ppc.c: Fix comments involving paddi.
277
62e0492f
AL
2782019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
279
280 PR 24643
281 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
282 absent, or the bfd is not in the ELF formart.
283 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
284
58e07198
CZ
2852019-06-10 Christos Zoulas <christos@zoulas.com>
286
287 PR 24650
288 * elf.c (elfcore_make_auxv_note_section): New function.
289 (elfcore_grok_note): Use it.
290 (elfcore_grok_freebsd_note): Likewise.
291 (elfcore_grok_openbsd_note): Likewise.
292 (elfcore_grok_netbsd_note): Likewise. Plus add support for
293 NT_NETBSDCORE_AUXV notes.
294
237df8fe
SD
2952019-06-06 Sudakshina Das <sudi.das@arm.com>
296
297 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
298 alignment of the new gnu property section.
299
8bf6d176
SD
3002019-06-06 Sudakshina Das <sudi.das@arm.com>
301
302 * bfd-in.h: Change comment.
303 * bfd-in2.h: Regenerate.
304 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
305 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
306 Likwise.
307
1e129bbe
FS
3082019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
309
310 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
311 Remove overflow check.
312
0f4a61b4
AM
3132019-05-28 Alan Modra <amodra@gmail.com>
314
315 PR 24596
316 * cofflink.c (coff_link_check_archive_element): Don't assume
317 element is a coff object file after calling add_archive_element.
318
94667ab1
AM
3192019-05-28 Alan Modra <amodra@gmail.com>
320
321 PR 24596
322 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
323 attempt to set sh_entsize for excluded PLT section.
324
28fbeab8
AM
3252019-05-28 Alan Modra <amodra@gmail.com>
326
327 PR 24596
328 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
329 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
330 allocated in alpha_dynamic_entries_for_reloc.
331
a0f6fd21
AM
3322019-05-28 Alan Modra <amodra@gmail.com>
333
334 PR 24596
335 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
336 on NULL output_section.
337 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
338
c83004d5
AM
3392019-05-28 Alan Modra <amodra@gmail.com>
340
341 PR 24596
342 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
343 entry when MUST_FIND. Abort when MUST_FIND not found.
344 (elf_m68k_get_bfd2got_entry): Likewise.
345 (elf_m68k_relocate_section): Remove now useless assert.
346
586338b8
AM
3472019-05-28 Alan Modra <amodra@gmail.com>
348
349 PR 24596
350 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
351 from bfd_link_info, not an output section owner.
352 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
353 (elf_hppa_final_link_relocate): Likewise.
354
a7b34aba
AM
3552019-05-28 Alan Modra <amodra@gmail.com>
356
357 PR 24596
358 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
359 create_object_symbols_section, obj_textsec, obj_datasec or
360 obj_bsssec. Fix other errors in placement.
361 * config.bfd: Obsolete tic30-aout.
362
0eb32b6e
AM
3632019-05-28 Alan Modra <amodra@gmail.com>
364
365 PR 24596
366 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
367 end of section list as well as section_count.
368 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
369 section list before returning error.
370
ce5aecf8
AM
3712019-05-27 Alan Modra <amodra@gmail.com>
372
373 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
374
3d7d6a6f
AM
3752019-05-27 Alan Modra <amodra@gmail.com>
376
377 PR 24596
378 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
379
823710d5
SN
3802019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
381
382 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
383 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
384 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
385 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
386 (elf_backend_merge_symbol_attribute): Define.
387
405b5bd8
AM
3882019-05-24 Alan Modra <amodra@gmail.com>
389
390 * po/SRC-POTFILES.in: Regenerate.
391
04bdff6a
AM
3922019-05-24 Alan Modra <amodra@gmail.com>
393
394 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
395 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
396 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
397 (struct ppc_link_hash_table): Add powerxx_stubs.
398 (ppc64_elf_check_relocs): Set powerxx_stubs.
399 (build_powerxx_offset, size_powerxx_offset),
400 (num_relocs_for_powerxx_offset),
401 (emit_relocs_for_powerxx_offset): New functions.
402 (plt_stub_size): Size powerxx stubs.
403 (ppc_build_one_stub): Emit powerxx stubs.
404 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
405 powerxx stubs.
406
4a421c53
AM
4072019-05-24 Alan Modra <amodra@gmail.com>
408
409 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
410 R_PPC64_GOT_PCREL34.
411 (xlate_pcrel_opt): New function.
412 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
413 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
414 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
415
5663e321
AM
4162019-05-24 Alan Modra <amodra@gmail.com>
417
418 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
419 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
420 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
421 (BFD_RELOC_PPC64_PLT_PCREL34),
422 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
423 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
424 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
425 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
426 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
427 * elf64-ppc.c (PNOP): Define.
428 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
429 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
430 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
431 relocs.
432 (ppc64_elf_prefix_reloc): New function.
433 (struct ppc_link_hash_table): Add notoc_plt.
434 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
435 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
436 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
437 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
438 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
439 possible need for dynamic relocs on non-pcrel powerxx relocs.
440 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
441 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
442 (toc_adjusting_stub_needed): Likewise.
443 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
444 (ppc64_elf_relocate_section): Handle new powerxx relocs.
445 * bfd-in2.h: Regenerate.
446 * libbfd.h: Regenerate.
447
fd0de36e
JM
4482019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
449
45d5293f
JM
450 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
451 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
452 bpf_elf64_be_vec.
453 * configure: Regenerate.
454
4552019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
456
fd0de36e
JM
457 * configure: Regenerated.
458 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
459 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
460 (BFD64_BACKENDS): Add elf64-bpf.lo.
461 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
462 * Makefile.in (SOURCE_HFILES): Regenerate.
463 * config.bfd (targ_cpu): Handle bpf-*-* targets.
464 * cpu-bpf.c: New file.
465 * elf64-bpf.c: Likewise.
466 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
467 bpf_elf64_le_vec.
468 * archures.c: Define architecture bfd_arch_bpf and machine
469 bfd_arch_bpf.
470 * reloc.c: Define BFD relocations used by the BPF target.
471 * bfd-in2.h: Regenerated.
472 * libbfd.h: Likewise.
473
b0f4fbf8
AM
4742019-05-22 Alan Modra <amodra@gmail.com>
475
476 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
477 contents.
478
9ec2f606
AM
4792019-05-22 Alan Modra <amodra@gmail.com>
480
481 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
482 processing on "size error in section".
483
4decd602
AM
4842019-05-22 Alan Modra <amodra@gmail.com>
485
486 * som.c (som_bfd_free_cached_info): Call
487 _bfd_generic_close_and_cleanup.
488
b474a202
FS
4892019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
490
491 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
492 for TLS_TPREL_HI16(/LO16) relocations in shared library.
493
304f09d0
FS
4942019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
495
496 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
497 checks. Search the RELA table for n64 relocations.
498
3734320d
MF
4992019-05-21 Matthew Fortune <matthew.fortune@mips.com>
500 Faraz Shahbazker <fshahbazker@wavecomp.com>
501
502 * elfxx-mips.c (LA25_BC): New macro.
503 (mips_elf_link_hash_table)<compact_branches>: New field.
504 (STUB_JALRC): New macro.
505 (mipsr6_o32_exec_plt0_entry_compact): New array.
506 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
507 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
508 (mipsr6_exec_plt_entry_compact): Likewise.
509 (mips_elf_create_la25_stub): Use BC instead of J for stubs
510 when compact_branches is true.
511 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
512 PLT for MIPSR6 with compact_branches. Do not reorder the
513 compact branches PLT. Switch the lazy stub for MIPSR6
514 with compact_branches to use JALRC.
515 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
516 when compact_branches is true.
517 (_bfd_mips_elf_compact_branches): New function.
518 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
519
64672071
TC
5202019-05-21 Tamar Christina <tamar.christina@arm.com>
521
522 PR ld/24373
523 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
524 Fix print formatter.
525
e6f65e75
AV
5262019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
527
528 PR 24460
529 * elf32-arm.c (get_value_helper): Remove.
530 (elf32_arm_final_link_relocate): Fix branch future relocations.
531
739b5c9c
TC
5322019-05-21 Tamar Christina <tamar.christina@arm.com>
533
534 PR ld/24373
535 * bfd-in.h (enum erratum_84319_opts): New
536 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
537 int to enum erratum_84319_opts.
538 * bfd-in2.h: Regenerate.
539 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
540 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
541 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
542 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
543 (_bfd_aarch64_resize_stubs): Amend comment.
544 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
545 requested.
546 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
547 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
548 erratum workaround.
549 (clear_erratum_843419_entry): Update erratum conditional.
550
7622049e
SKS
5512019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
552
553 PR ld/24571
554 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
555 when computing distance_short_enough.
556
338ba755
SKS
5572019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
558
559 PR ld/24564
560 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
561 Wrap around even if distance equals avr_pc_wrap_around.
562
999b073b
NC
5632019-05-20 Nick Clifton <nickc@redhat.com>
564
565 * po/fr.po: Updated French translation.
566
a7ad558c
AV
5672019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
568
569 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
570
a2699ef2
AM
5712019-05-16 Alan Modra <amodra@gmail.com>
572
573 * elf32-arm.c (elf32_arm_write_section): Revert last change.
574
3a1bb98c
AM
5752019-05-15 Alan Modra <amodra@gmail.com>
576
577 * elf32-arm.c (elf32_arm_write_section): Don't leave
578 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
579 unitialised section contents.
580
37d0d091
JH
5812019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
582
583 PR 19921
584 * verilog.c: (VerilogDataWidth): New variable.
585 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
586
79299211
NC
5872019-05-08 Nick Clifton <nickc@redhat.com>
588
589 PR 24523
590 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
591 rather than FALSE if encountering a non-ELF file.
592
e1cbf07a
AM
5932019-05-06 Alan Modra <amodra@gmail.com>
594
595 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
596
334d91b9
AM
5972019-05-06 Alan Modra <amodra@gmail.com>
598
599 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
600 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
601 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
602 * libbfd.h: Regenerate.
603 * bfd-in2.h: Regenerate.
604
a288c270
AM
6052019-05-04 Alan Modra <amodra@gmail.com>
606
607 PR 24511
608 * syms.c (coff_section_type): Only allow '.', '$' and numeric
609 following the standard section names.
610 (bfd_decode_symclass): Prioritize section flag tests in
611 decode_section_type before name tests in coff_section_type.
612 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
613 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
614 their names and choose standard .text section flags for
615 fake_section.
616
2cdc1a97
NC
6172019-05-02 Nick Clifton <nickc@redhat.com>
618
619 PR 24493
620 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
621 .gnu.debugaltlink sections as debugging sections.
622
066f4018
AM
6232019-04-30 Alan Modra <amodra@gmail.com>
624
625 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
626 (struct _ppc64_elf_section_data): Likewise.
627 (ppc64_elf_check_relocs): Set above fields.
628 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
629 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
630 when possible.
631
c54f1524
L
6322019-04-26 H.J. Lu <hongjiu.lu@intel.com>
633
634 PR ld/24486
635 * elflink.c (elf_link_output_extsym): Don't complain undefined
636 weak dynamic reference.
637
68bb0359
SD
6382019-04-25 Sudakshina Das <sudi.das@arm.com>
639
640 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
641 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
642 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
643 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
644 (elfNN_aarch64_small_plt0_pac_entry): Remove.
645 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
646 (elfNN_aarch64_small_plt0_bti_entry): Update.
647 (elfNN_aarch64_small_plt_bti_entry): Update.
648 (elfNN_aarch64_small_plt_pac_entry): Update.
649 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
650 (setup_plt_values): Setup new entries.
651 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
652 (elfNN_aarch64_plt_sym_val): Likewise.
653
79b8e8ab
JW
6542019-04-22 Jim Wilson <jimw@sifive.com>
655
656 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
657
fce97736
AM
6582019-04-19 Alan Modra <amodra@gmail.com>
659
660 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
661
9a7f0679
L
6622019-04-17 H.J. Lu <hongjiu.lu@intel.com>
663
664 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
665 building shared object.
666 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
667
4e84a8f8
L
6682019-04-17 H.J. Lu <hongjiu.lu@intel.com>
669
670 PR ld/24458
671 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
672 linker_def.
673
32c36c3c
AV
6742019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
675
676 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
677 relocation.
678 * bfd-in2.h: Regenerate.
679 * libbfd.h: Likewise.
680
60f993ce
AV
6812019-04-15 Sudakshina Das <sudi.das@arm.com>
682
683 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
684 * bfd-in2.h: Regenerated.
685 * libbfd.h: Regenerated.
686
f6b2b12d
AV
6872019-04-15 Sudakshina Das <sudi.das@arm.com>
688
689 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
690 * bfd-in2.h: Regenerated.
691 * libbfd.h: Likewise.
692
1889da70
AV
6932019-04-15 Sudakshina Das <sudi.das@arm.com>
694
695 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
696 * bfd-in2.h: Regenerated.
697 * libbfd.h: Regenerated.
698 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
699 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
700 and R_ARM_THM_BF12 together.
701 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
702
1caf72a5
AV
7032019-04-15 Sudakshina Das <sudi.das@arm.com>
704
705 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
706 * libbfd.h: Regenerated.
707 * bfd-in2.h: Regenerated.
708 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
709 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
710 and R_ARM_THM_BF18 together.
711 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
712
e5d6e09e
AV
7132019-04-15 Sudakshina Das <sudi.das@arm.com>
714
715 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
716 * bfd-in2.h: Regenerated.
717 * libbfd.h: Regenerated.
718 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
719 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
720 and R_ARM_THM_BF16 together.
721 (get_value_helper): New reloc helper.
722 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
723
e12437dc
AV
7242019-04-15 Sudakshina Das <sudi.das@arm.com>
725
726 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
727 * bfd-in2.h: Regenerate.
728 * libbfd.h: Regenerate.
729
031254f2
AV
7302019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
731
732 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
733 * bfd-in2.h: Regenerate.
734 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
735 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
736 and update assert.
737 (using_thumb2): Likewise.
738 (using_thumb2_bl): Update assert.
739 (arch_has_arm_nop): Likewise.
740 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
741 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
742
233a0083
L
7432019-04-11 H.J. Lu <hongjiu.lu@intel.com>
744
745 * elf-linker-x86.h (elf_x86_cet_report): New.
746 (elf_linker_x86_params): Add cet_report.
747 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
748 missing IBT and SHSTK properties if needed.
749
a0ea3a14
L
7502019-04-11 H.J. Lu <hongjiu.lu@intel.com>
751
ca4e6331 752 PR ld/24436
a0ea3a14
L
753 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
754 "h != NULL". Don't check "h != NULL" before calling.
755 bfd_elf_gc_record_vtentry.
756 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
757 * elf32-bfin.c (bfin_check_relocs): Likewise.
758 * elf32-cris.c (cris_elf_check_relocs): Likewise.
759 * elf32-csky.c (csky_elf_check_relocs): Likewise.
760 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
761 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
762 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
763 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
764 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
765 * elf32-i386.c (elf_i386_check_relocs): Likewise.
766 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
767 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
768 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
769 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
770 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
771 * elf32-metag.c (elf_metag_check_relocs): Likewise.
772 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
773 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
774 * elf32-s390.c (elf_s390_check_relocs): Likewise.
775 * elf32-sh.c (sh_elf_check_relocs): Likewise.
776 * elf32-v850.c (v850_elf_check_relocs): Likewise.
777 * elf32-vax.c (elf_vax_check_relocs): Likewise.
778 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
779 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
780 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
781 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
782 * elf64-s390.c (elf_s390_check_relocs): Likewise.
783 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
784 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
785 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
786 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
787 VTENTRY entry.
788
9bff840e
AM
7892019-04-11 Alan Modra <amodra@gmail.com>
790
791 PR 24435
792 * elflink.c (elf_link_add_object_symbols): Don't read partial
793 dynamic entries from fuzzed objects.
794
ce12121b
TC
7952019-04-11 Tamar Christina <tamar.christina@arm.com>
796
797 PR ld/24302
798 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
799 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
800 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
801
b05971a6
MF
8022019-04-10 Michael Forney <mforney@mforney.org>
803
804 PR 24427
805 * doc/chew.c (free_words): Correctly free "push_text" strings.
806
3ae61bb6
L
8072019-04-08 H.J. Lu <hongjiu.lu@intel.com>
808
809 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
810
5f2a6b85
AM
8112019-04-08 Alan Modra <amodra@gmail.com>
812
813 * configure.ac (elfxx_x86): Define and use.
814 * configure: Regenerate.
815
5b9c07b2
L
8162019-04-06 H.J. Lu <hongjiu.lu@intel.com>
817
818 * elf-linker-x86.h: New file.
819 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
820 to get x86-specific linker options.
821 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
822 (elf_x86_64_check_relocs): Likewise.
823 (elf_x86_64_relocate_section): Likewise.
824 (elf_x86_64_link_setup_gnu_properties): Likewise.
825 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
826 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
827 (_bfd_elf_linker_x86_set_options): New function.
828 * elfxx-x86.h: Include "elf-linker-x86.h".
829 (elf_x86_link_hash_table): Add params.
830
4b24dd1a
AM
8312019-04-03 Alan Modra <amodra@gmail.com>
832
833 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
834 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
835 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
836 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
837 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
838 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
839
87f98bac
JW
8402019-04-02 Jim Wilson <jimw@sifive.com>
841
842 PR 24389
843 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
844 ELF header flags to after check for ELF object file. Loop through
845 sections looking for code sections, if none, then skip ABI checks.
846
ae2b14c7
JW
8472019-03-30 Andrew Waterman <andrew@sifive.com>
848
849 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
850 rd == X_RA case.
851
2487ef07
MF
8522019-03-29 Max Filippov <jcmvbkbc@gmail.com>
853
854 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
855 info->export_dynamic to the conditional.
856
242a1159
AM
8572019-03-28 Alan Modra <amodra@gmail.com>
858
859 PR 24392
860 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
861 * configure: Regenerate.
862 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
863 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
864 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
865 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
866 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
867
a9f5a551
JW
8682019-03-21 Jim Wilson <jimw@sifive.com>
869
870 PR 24365
871 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
872 verify sym non-NULL before using. Add identical check using h.
873
4e539114
SD
8742019-03-21 Sudakshina Das <sudi.das@arm.com>
875
876 * elf-bfd.h (struct elf_backend_data): Add argument to
877 merge_gnu_properties.
878 * elf-properties.c (elf_merge_gnu_properties): Add argument to
879 itself and while calling bed->merge_gnu_properties.
880 (elf_merge_gnu_property_list): Update the calls for
881 elf_merge_gnu_properties.
882 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
883 of --force-bti warning and add argument.
884 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
885 warning.
886 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
887 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
888 declaration.
889
acde6c6b
SD
8902019-03-20 Sudakshina Das <sudi.das@arm.com>
891
892 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
893 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
894 (elf_backend_fixup_gnu_properties): Define for AArch64.
895
8cd1fe1b
AM
8962019-03-18 Alan Modra <amodra@gmail.com>
897
898 PR 24355
899 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
900 for local iplt syms with ent->plt.offset == -1. Remove ineffective
901 attempt at writing glink stubs only once.
902
6835821b
AM
9032019-03-16 Alan Modra <amodra@gmail.com>
904
905 PR 24337
906 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
907 (_bfd_elf_rel_local_sym): Likewise.
908 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
909 section of symbols with unrecognized shndx.
910
2219ae0b
L
9112019-03-15 H.J. Lu <hongjiu.lu@intel.com>
912
913 PR ld/24267
914 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
915 section.
916 * cofflink.c (coff_link_add_symbols): Check for symbols defined
917 in discarded section.
918
fe3fef62
AM
9192019-03-15 Alan Modra <amodra@gmail.com>
920
921 PR 24339
922 * elflink.c (elf_link_add_object_symbols): Bail out on a local
923 symbol after globals if elf_bad_symtab is not set.
924
1ff31e13
AM
9252019-03-15 Alan Modra <amodra@gmail.com>
926
927 PR 24337
928 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
929 (_bfd_elf_rel_local_sym): Likewise.
930
f55b1e32
AM
9312019-03-15 Alan Modra <amodra@gmail.com>
932
933 PR 24336
934 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
935 object files with sh_size not a multiple of sh_entsize.
936
da0d12d2
L
9372019-03-15 H.J. Lu <hongjiu.lu@intel.com>
938
418d4036
L
939 PR ld/24338
940 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
941 input with bad relocation.
942
94322019-03-15 H.J. Lu <hongjiu.lu@intel.com>
944
da0d12d2
L
945 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
946
d7f848c3
NC
9472019-03-14 Nick Clifton <nickc@redhat.com>
948
949 PR 24334
950 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
951 (save_section_vma): Initialise field to the number of entries in
952 the sec_vma table.
953 (section_vma_same): Check that the number of entries in the
954 sec_vma table matches the number of sections in the bfd.
955
6cc71b82
NC
9562019-03-14 Nick Clifton <nickc@redhat.com>
957
958 PR 24333
959 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
960 section owner pointer when adding the default symbol.
961
be22c732
NC
9622019-03-14 Nick Clifton <nickc@redhat.com>
963
964 PR 24332
965 * elflink.c (elf_link_add_object_symbols): Add new local variable
966 extversym_end. Initialise it to point to the end of the version
967 symbol table, if present. Check it when initialising and updating
968 the ever pointer.
969
1dbade74
SD
9702019-03-13 Sudakshina Das <sudi.das@arm.com>
971
972 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
973 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
974 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
975 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
976 and PLT_PAC_PLT.
977 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
978 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
979 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
980
37c18eed
SD
9812019-03-13 Sudakshina Das <sudi.das@arm.com>
982 Szabolcs Nagy <szabolcs.nagy@arm.com>
983
984 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
985 (aarch64_bti_pac_info): New.
986 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
987 (bfd_elf32_aarch64_set_options): Likewise.
988 * bfd-in2.h: Regenerate
989 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
990 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
991 (elfNN_aarch64_small_plt0_bti_entry): New.
992 (elfNN_aarch64_small_plt_bti_entry): New.
993 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
994 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
995 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
996 tlsdesc_plt_entry_size fields.
997 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
998 (setup_plt_values): New helper function.
999 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1000 bti enable type.
1001 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1002 fixed macros.
1003 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1004 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1005 to plt stubs instead of fixed ones and update filling them according
1006 to the need for bti.
1007 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1008 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1009 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1010 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1011 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1012 is set.
1013 (bfd_elfNN_get_synthetic_symtab): Define.
1014 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1015 and mising BTI NOTE SECTION.
1016
1017
cd702818
SD
10182019-03-13 Sudakshina Das <sudi.das@arm.com>
1019
1020 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1021 linker created inputs from merge.
1022 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1023 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1024 (elfNN_aarch64_link_setup_gnu_properties): New.
1025 (elfNN_aarch64_merge_gnu_properties): New.
1026 (elf_backend_setup_gnu_properties): Define for AArch64.
1027 (elf_backend_merge_gnu_properties): Likewise.
1028 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1029 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1030 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1031 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1032 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1033 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1034 (elf_backend_parse_gnu_properties): Define for AArch64.
1035
44b27f95
L
10362019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1037
1038 PR ld/24322
1039 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1040 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1041
7a6e0d89
AM
10422019-03-12 Alan Modra <amodra@gmail.com>
1043
1044 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1045 nmemb parameter. Use bfd_alloc2.
1046 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1047 Delete assertion.
1048 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1049 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1050 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1051 doesn't overflow.
1052 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1053 (assign_section_numbers): Style fix.
1054 (swap_out_syms): Use bfd_malloc2.
1055 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1056 overflow.
1057 (_bfd_elf_make_empty_symbol): Style fix.
1058 (elfobj_grok_stapsdt_note_1): Formatting.
1059 * elfcode.h (elf_object_p): Use bfd_alloc2.
1060 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1061 (elf_slurp_symbol_table): Use bfd_zalloc2.
1062 (elf_slurp_reloc_table): Use bfd_alloc2.
1063 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1064 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1065 size calculation doesn't overflow.
1066 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1067 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1068 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1069
ebd2263b
AM
10702019-03-08 Alan Modra <amodra@gmail.com>
1071
1072 PR 24311
1073 * merge.c (merge_strings): Return secinfo. Don't pad section
1074 to alignment here.
1075 (_bfd_merge_sections): Pad section to alignment here, if input
1076 sections contributing to merged output all pad to alignment.
1077 Formatting.
1078
219d6836
NC
10792019-03-06 Nick Clifton <nickc@redhat.com>
1080
1081 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1082 table pointer.
1083 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1084 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1085
24801b15
AK
10862019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1087
1088 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1089 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1090
1091 PR 20113
1092 * elf32-s390.c (allocate_dynrelocs): Update comment.
1093
4ffd2909
TC
10942019-02-28 Tamar Christina <tamar.christina@arm.com>
1095
1096 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1097
eed5def8
NC
10982019-02-28 Nick Clifton <nickc@redhat.com>
1099
1100 PR 24273
1101 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1102 section that is not NUL terminated.
1103
5cfe428c
L
11042019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1105
1106 PR ld/24276
1107 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1108 by linker when checking copy reloc on protected symbol.
1109
f616c36b
AM
11102019-02-24 Alan Modra <amodra@gmail.com>
1111
1112 PR 24144
1113 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1114
eed62915
MF
11152019-02-20 Eric Tsai <erictsai@cadence.com>
1116
1117 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1118 sections between the call site and call destination and adjust
1119 call distance by the largest alignment.
1120
e6c3b5bf
AH
11212019-02-20 Alan Hayward <alan.hayward@arm.com>
1122
1123 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1124 * elf.c (elfcore_grok_aarch_pauth): New function.
1125 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1126 (elfcore_write_aarch_pauth): New function.
1127 (elfcore_write_register_note): Check for AArch64 pauth section.
1128
34d75fb5
AM
11292019-02-20 Alan Modra <amodra@gmail.com>
1130
1131 PR 24225
1132 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1133 return value.
1134
edd01d07
MR
11352019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1136
1137 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1138 Darwin hosts, not just or1k.
1139 * configure: Regenerate.
1140
8abac803
AM
11412019-02-20 Alan Modra <amodra@gmail.com>
1142
1143 PR 24236
1144 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1145 sentinel NUL to string buffer nearer to loop where it is used.
1146 Don't go past sentinel when scanning strings, and don't write
1147 NUL again.
1148 * archive.c (do_slurp_coff_armap): Simplify string handling to
1149 archive64.c style.
1150
179f2db0
AM
11512019-02-19 Alan Modra <amodra@gmail.com>
1152
1153 PR 24235
1154 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1155 attempting to prevent read past end of section.
1156
a31b8bd9
AM
11572019-02-18 Alan Modra <amodra@gmail.com>
1158
1159 PR 24225
1160 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1161 PRIx64 to generate warning messages. Print local sym names too.
1162
a0e90a73
CZ
11632019-02-09 Vineet Gupta <vgupta@synopsys.com>
1164
1165 * elf32-arc (INIT_SYM_STRING): Delete.
1166 (FINI_SYM_STRING): Likewise.
1167 (init_str): Likewise.
1168 (fini_str): Likewise.
1169
482f3505
AM
11702019-02-08 Alan Modra <amodra@gmail.com>
1171
1172 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1173 for bss-plt" warning to make it an error.
1174
b2abe1bd
EB
11752019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1176
1177 PR ld/18841
1178 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1179 reloc_class_ifunc for ifunc symbols.
1180 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1181
68a09132
EB
11822019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1183
1184 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1185 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1186
2012bf01
NC
11872019-02-07 Nick Clifton <nickc@redhat.com>
1188
1189 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1190 into the definitely obsolete list.
1191
83924b38
L
11922019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1193
1194 PR ld/24151
1195 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1196 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1197 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1198 relocations to ...
1199 (elf_x86_64_check_relocs): Here.
1200 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1201 to check if a symbol is defined in a non-shared object.
1202 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1203
453f8e1e
SDJ
12042019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1207 of 'labs' (and fix GCC warning).
1208
9ed1348c
NC
12092019-01-25 Nick Clifton <nickc@redhat.com>
1210
1211 * po/ru.po: Updated Russian translation.
1212
d9938630
NC
12132019-01-23 Nick Clifton <nickc@redhat.com>
1214
1215 * po/fr.po: Updated French translation.
1216
375cd423
NC
12172019-01-21 Nick Clifton <nickc@redhat.com>
1218
1219 * po/pt.po: Updated Portuguese translation.
1220 * po/uk.po: Updated Ukranian translation.
1221
acef8081
YC
12222019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1223
1224 PR 24108
1225 * elf32-nds32.c (nds32_relocate_section): Add space between words
1226 in error message.
1227 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1228 error message.
1229 (riscv_i_or_e_p): Likewise.
1230 (riscv_merge_arch_attr_info): Likewise.
1231
f48dfe41
NC
12322019-01-19 Nick Clifton <nickc@redhat.com>
1233
1234 * version.m4: Reset to 2.32.51
1235 * configure: Regenerate.
1236 * po/bfd.pot: Regenerate.
1237
f974f26c
NC
12382018-06-24 Nick Clifton <nickc@redhat.com>
1239
1240 2.32 branch created.
1241
a4bf3d07
JW
12422019-01-16 Kito Cheng <kito@andestech.com>
1243
1244 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1245 for OBJ_ATTR_PROC.
1246
2dc8dd17
JW
12472019-01-16 Kito Cheng <kito@andestech.com>
1248 Nelson Chu <nelson@andestech.com>
1249
7d7a7d7c
JW
1250 * elfnn-riscv.c (in_subsets): New.
1251 (out_subsets): Likewise.
1252 (merged_subsets): Likewise.
1253 (riscv_std_ext_p): Likewise.
1254 (riscv_non_std_ext_p): Likewise.
1255 (riscv_std_sv_ext_p): Likewise.
1256 (riscv_non_std_sv_ext_p): Likewise.
1257 (riscv_version_mismatch): Likewise.
1258 (riscv_i_or_e_p): Likewise.
1259 (riscv_merge_std_ext): Likewise.
1260 (riscv_merge_non_std_and_sv_ext): Likewise.
1261 (riscv_merge_arch_attr_info): Likewise.
1262 (riscv_merge_attributes): Likewise.
1263 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1264
2dc8dd17
JW
1265 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1266 (elf_backend_obj_attrs_vendor): Define.
1267 (elf_backend_obj_attrs_section_type): Likewise.
1268 (elf_backend_obj_attrs_section): Likewise.
1269 (elf_backend_obj_attrs_arg_type): Define as
1270 riscv_elf_obj_attrs_arg_type.
1271 * elfxx-riscv.c (riscv_estimate_digit): New.
1272 (riscv_estimate_arch_strlen1): Likewise.
1273 (riscv_estimate_arch_strlen): Likewise.
1274 (riscv_arch_str1): Likewise.
1275 (riscv_arch_str): Likewise.
1276 * elfxx-riscv.h (riscv_arch_str): Declare.
1277
d5dcaf1b
JD
12782019-01-14 John Darrington <john@darrington.wattle.id.au>
1279
1280 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1281 * libbfd.h: regen.
1282 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1283 source field. (md_apply_fix): Apply final fix
1284 to BFD_RELOC_S12Z_OPR.
1285 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1286
5a12586d
MT
12872019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1288
f466c305 1289 PR 20113
5a12586d
MT
1290 * elf32-s390.c (allocate_dynrelocs): Update comment.
1291
3107326d
AP
12922019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1293
1294 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1295 * configure: Regenerate.
1296
a9859e01
AM
12972019-01-08 Alan Modra <amodra@gmail.com>
1298
1299 PR 23699
1300 PR 24065
1301 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1302 address range.
1303
c8c89dac
YS
13042019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1305
1306 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1307 * bfd/bfd-in2.h: Regenerate.
1308 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1309 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1310
d9858c37
LX
13112019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1312
1313 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1314 default target, little endian target is more suitable.
1315
677bd4c6
AM
13162019-01-04 Alan Modra <amodra@gmail.com>
1317
1318 PR 24061
1319 PR 21786
1320 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1321 adjust all callers.
1322 (EQ_VALUE_IN_FIELD): Likewise.
1323 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1324
82704155
AM
13252019-01-01 Alan Modra <amodra@gmail.com>
1326
1327 Update year range in copyright notice of all files.
1328
d5c04e1b 1329For older changes see ChangeLog-2018
3499769a 1330\f
d5c04e1b 1331Copyright (C) 2019 Free Software Foundation, Inc.
3499769a
AM
1332
1333Copying and distribution of this file, with or without modification,
1334are permitted in any medium without royalty provided the copyright
1335notice and this notice are preserved.
1336
1337Local Variables:
1338mode: change-log
1339left-margin: 8
1340fill-column: 74
1341version-control: never
1342End: