C99 bfd configury
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2021-04-05 Alan Modra <amodra@gmail.com>
2
3 * configure.ac: Don't check for long long or long double type.
4 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
5 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
6 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
7 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
8 (AC_ISC_POSIX): Don't invoke.
9 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
10 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
11 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
12 header order as per automake AC_INCLUDES_DEFAULT.
13 * bfd-in.h: Include inttypes.h unconditionally.
14 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
15 long double are available.
16 (bfd_scan_vma): Assume long long and strtoull are available.
17 * elflink.c: Include limits.h unconditionally.
18 * elfnn-riscv.c: Likewise.
19 * wasm-module.c: Likewise.
20 * hpux-core.c: Include dirent.h unconditionally.
21 * trad-core.c: Likewise.
22 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
23 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
24 * elf32-m68hc1x.c: Don't include alloca-conf.h.
25 * elf64-hppa.c: Likewise.
26 * som.c: Likewise.
27 * wasm-module.c: Likewise.
28 * xsym.c: Likewise.
29 * bfd-in2.h: Regenerate.
30 * config.in: Regenerate.
31 * configure: Regenerate.
32
33 2021-04-01 Tamar Christina <tamar.christina@arm.com>
34
35 PR ld/26659
36 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
37
38 2021-04-01 Martin Liska <mliska@suse.cz>
39
40 * ecoff.c (strneq): Remove strneq and use startswith.
41 (_bfd_ecoff_slurp_armap): Likewise.
42
43 2021-04-01 Martin Liska <mliska@suse.cz>
44
45 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
46 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
47 (elf_get_reloc_section): Likewise.
48 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
49 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
50 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
51 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
52 (nds32_elf_relocate_section): Likewise.
53 (nds32_elf_action_discarded): Likewise.
54 (nds32_elf_check_relocs): Likewise.
55 (nds32_elf_section_flags): Likewise.
56 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
57 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
58 * elf32-rx.c (rx_table_find): Likewise.
59 (rx_table_map): Likewise.
60 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
61 (spu_elf_find_overlays): Likewise.
62 (needs_ovl_stub): Likewise.
63 (allocate_spuear_stubs): Likewise.
64 (build_spuear_stubs): Likewise.
65 (mark_overlay_section): Likewise.
66 (spu_elf_auto_overlay): Likewise.
67 (spu_elf_output_symbol_hook): Likewise.
68 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
69 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
70 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
71 (ppc64_elf_relocate_section): Likewise.
72 * elflink.c (resolve_section): Likewise.
73 (UNARY_OP): Likewise.
74 (BINARY_OP_HEAD): Likewise.
75 (elf_link_input_bfd): Likewise.
76 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
77 * elfxx-riscv.c (riscv_parse_subset): Likewise.
78 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
79 * opncls.c (get_build_id): Likewise.
80
81 2021-03-31 Alan Modra <amodra@gmail.com>
82
83 PR 27671
84 * bfd-in.h: Don't poison FALSE or TRUE.
85 * bfd-in2.h: Regenerate.
86
87 2021-03-31 Alan Modra <amodra@gmail.com>
88
89 * sysdep.h: POISON_BFD_BOOLEAN: Define.
90 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
91 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
92 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
93 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
94 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
95 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
96 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
97 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
98 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
99 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
100 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
101 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
102 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
103 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
104 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
105 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
106 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
107 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
108 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
109 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
110 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
111 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
112 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
113 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
114 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
115 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
116 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
117 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
118 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
119 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
120 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
121 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
122 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
123 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
124 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
125 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
126 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
127 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
128 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
129 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
130 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
131 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
132 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
133 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
134 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
135 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
136 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
137 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
138 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
139 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
140 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
141 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
142 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
143 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
144 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
145 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
146 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
147 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
148 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
149 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
150 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
151 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
152 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
153 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
154 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
155 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
156 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
157 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
158 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
159 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
160 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
161 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
162 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
163 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
164 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
165 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
166 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
167 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
168 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
169 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
170 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
171 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
172 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
173 TRUE with true throughout.
174 * bfd-in2.h: Regenerate.
175 * libbfd.h: Regenerate.
176 * libcoff.h: Regenerate.
177
178 2021-03-31 Alan Modra <amodra@gmail.com>
179
180 * bfd-in.h: Include stdbool.h.
181 (bfd_boolean): Define as bool
182 * bfd-in2.h: Regenerate.
183
184 2021-03-31 Alan Modra <amodra@gmail.com>
185
186 * .gitignore: Delete bfd_stdint.h entry.
187 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
188 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
189 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
190 * configure.ac: Don't invoke GCC_HEADER_STDINT.
191 * configure.com: Don't create bfd_stdint.h.
192 * Makefile.in: Regenerate.
193 * aclocal.m4: Regenerate.
194 * bfd-in2.h: Regenerate.
195 * config.in: Regenerate.
196 * configure: Regenerate.
197 * doc/Makefile.in: Regenerate.
198 * po/BLD-POTFILES.in: Regenerate.
199
200 2021-03-31 Alan Modra <amodra@gmail.com>
201
202 * bfd-in.h: Include string.h.
203 (LITMEMCPY, LITSTRCPY): Delete.
204 * bfd-in2.h: Regenerate.
205
206 2021-03-30 Alan Modra <amodra@gmail.com>
207
208 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
209 unless is_elf_hash_table.
210
211 2021-03-29 Alan Modra <amodra@gmail.com>
212
213 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
214 to bfd_boolean.
215 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
216 against FALSE.
217 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
218 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
219 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
220 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
221 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
222 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
223 * elf32-rx.c (rx_set_section_contents): Likewise.
224 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
225 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
226 * mach-o.c (bfd_mach_o_read_command): Likewise.
227 * targets.c (bfd_get_target_info): Likewise.
228
229 2021-03-29 Alan Modra <amodra@gmail.com>
230
231 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
232 * elf32-z80.c (z80_is_local_label_name): Likewise.
233 * elf32-spu.c (spu_elf_modify_headers): Likewise.
234 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
235 Change type to int.
236 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
237 for error return from vms_write_data_block.
238
239 2021-03-29 Alan Modra <amodra@gmail.com>
240
241 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
242 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
243 (elf64_ia64_local_dyn_sym_thunk): Likewise.
244 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
245 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
246 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
247 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
248 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
249 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
250 (riscv_pcrel_reloc_eq): Likewise.
251 (riscv_elf_finish_local_dynamic_symbol): Likewise.
252 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
253 (finish_local_dynamic_symbol): Likewise.
254 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
255 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
256 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
257
258 2021-03-29 Alan Modra <amodra@gmail.com>
259
260 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
261 a void pointer.
262 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
263 elf_link_output_symstrtab when calling output_arch_syms and
264 output_arch_local_syms.
265 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
266 elf_backend_output_arch_local_syms>): Change return type of func
267 arg to match elf_link_output_symstrtab.
268 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
269 return type.
270 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
271 (nds32_elf_output_arch_syms): Correct func return type.
272
273 2021-03-29 Alan Modra <amodra@gmail.com>
274
275 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
276 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
277 * elf32-arc.c (elf_arc_relocate_section): Likewise.
278 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
279 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
280 * elf32-bfin.c (bfin_relocate_section): Likewise.
281 (bfinfdpic_relocate_section): Likewise.
282 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
283 * elf32-cris.c (cris_elf_relocate_section): Likewise.
284 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
285 * elf32-csky.c (csky_elf_relocate_section): Likewise.
286 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
287 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
288 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
289 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
290 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
291 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
292 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
293 * elf32-i386.c (elf_i386_relocate_section): Likewise.
294 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
295 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
296 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
297 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
298 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
299 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
300 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
301 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
302 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
303 * elf32-mep.c (mep_elf_relocate_section): Likewise.
304 * elf32-metag.c (elf_metag_relocate_section): Likewise.
305 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
306 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
307 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
308 * elf32-mt.c (mt_elf_relocate_section): Likewise.
309 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
310 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
311 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
312 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
313 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
314 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
315 * elf32-rx.c (rx_elf_relocate_section): Likewise.
316 * elf32-s390.c (elf_s390_relocate_section): Likewise.
317 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
318 (_bfd_score_elf_relocate_section): Likewise.
319 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
320 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
321 * elf32-sh.c (sh_elf_relocate_section): Likewise.
322 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
323 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
324 * elf32-v850.c (v850_elf_relocate_section): Likewise.
325 * elf32-vax.c (elf_vax_relocate_section): Likewise.
326 * elf32-visium.c (visium_elf_relocate_section): Likewise.
327 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
328 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
329 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
330 * elf32-z80.c (z80_elf_relocate_section): Likewise.
331 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
332 (elf64_alpha_relocate_section): Likewise.
333 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
334 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
335 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
336 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
337 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
338 * elf64-s390.c (elf_s390_relocate_section): Likewise.
339 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
340 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
341 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
342 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
343 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
344 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
345 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
346 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
347 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
348 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
349
350 2021-03-26 Keith Seitz <keiths@redhat.com>
351
352 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
353 offset of program headers after calling elf_read_notes.
354
355 2021-03-23 Jan Beulich <jbeulich@suse.com>
356
357 * dwarf2.c (read_indexed_string): Rename index to idx.
358
359 2021-03-22 Martin Liska <mliska@suse.cz>
360
361 * bfd-in.h (startswith): Add startswith function.
362 (CONST_STRNEQ): Remove.
363 * bfd-in2.h (startswith): Regenerate with make headers.
364 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
365 (_bfd_slurp_extended_name_table): Likewise.
366 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
367 * bfd.c (bfd_get_sign_extend_vma): Likewise.
368 (bfd_convert_section_size): Likewise.
369 (bfd_convert_section_contents): Likewise.
370 * coff-stgo32.c (go32exe_create_stub): Likewise.
371 (go32exe_check_format): Likewise.
372 * coffcode.h (styp_to_sec_flags): Likewise.
373 (GNU_DEBUGALTLINK): Likewise.
374 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
375 (coff_gc_sweep): Likewise.
376 (bfd_coff_gc_sections): Likewise.
377 * cofflink.c (coff_link_add_symbols): Likewise.
378 (process_embedded_commands): Likewise.
379 * compress.c (bfd_is_section_compressed_with_header): Likewise.
380 (bfd_init_section_decompress_status): Likewise.
381 * dwarf2.c (find_debug_info): Likewise.
382 (place_sections): Likewise.
383 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
384 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
385 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
386 (assign_section_numbers): Likewise.
387 (elfcore_grok_win32pstatus): Likewise.
388 * elf32-arm.c (cmse_scan): Likewise.
389 (elf32_arm_gc_mark_extra_sections): Likewise.
390 (elf32_arm_size_dynamic_sections): Likewise.
391 (is_arm_elf_unwind_section_name): Likewise.
392 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
393 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
394 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
395 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
396 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
397 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
398 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
399 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
400 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
401 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
402 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
403 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
404 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
405 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
406 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
407 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
408 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
409 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
410 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
411 (elf32_tic6x_size_dynamic_sections): Likewise.
412 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
413 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
414 (xtensa_is_insntable_section): Likewise.
415 (xtensa_is_littable_section): Likewise.
416 (xtensa_is_proptable_section): Likewise.
417 (xtensa_property_section_name): Likewise.
418 (xtensa_callback_required_dependence): Likewise.
419 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
420 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
421 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
422 (get_reloc_section): Likewise.
423 (elf64_ia64_size_dynamic_sections): Likewise.
424 (elf64_ia64_object_p): Likewise.
425 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
426 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
427 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
428 * elflink.c (elf_link_add_object_symbols): Likewise.
429 (_bfd_elf_gc_mark_extra_sections): Likewise.
430 (bfd_elf_parse_eh_frame_entries): Likewise.
431 (_bfd_elf_section_already_linked): Likewise.
432 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
433 * elfnn-ia64.c (is_unwind_section_name): Likewise.
434 (elfNN_ia64_size_dynamic_sections): Likewise.
435 (elfNN_ia64_object_p): Likewise.
436 * elfxx-mips.c (FN_STUB_P): Likewise.
437 (CALL_STUB_P): Likewise.
438 (CALL_FP_STUB_P): Likewise.
439 (_bfd_mips_elf_section_from_shdr): Likewise.
440 (_bfd_mips_elf_fake_sections): Likewise.
441 (_bfd_mips_elf_size_dynamic_sections): Likewise.
442 (_bfd_mips_final_write_processing): Likewise.
443 (_bfd_mips_elf_final_link): Likewise.
444 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
445 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
446 (elf_x86_64_is_reloc_section): Likewise.
447 * hpux-core.c (thread_section_p): Likewise.
448 * libcoff.h (bfd_pei_p): Likewise.
449 * linker.c (REAL): Likewise.
450 (unwrap_hash_lookup): Likewise.
451 (_bfd_generic_link_add_one_symbol): Likewise.
452 * mmo.c (mmo_internal_write_section): Likewise.
453 * osf-core.c (osf_core_core_file_p): Likewise.
454 * pef.c (bfd_pef_print_symbol): Likewise.
455 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
456 * som.c (som_slurp_symbol_table): Likewise.
457 (som_slurp_armap): Likewise.
458 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
459
460 2021-03-22 Jan Beulich <jbeulich@suse.com>
461
462 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
463 language translation wrapping to _bfd_error_handler()
464 invocations.
465
466 2021-03-21 Alan Modra <amodra@gmail.com>
467
468 * bfd-in.h (startswith): New inline.
469 (CONST_STRNEQ): Use startswith.
470 * bfd-in2.h: Regenerate.
471
472 2021-03-20 Alan Modra <amodra@gmail.com>
473
474 PR 27590
475 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
476 test for .gnu.debuglto*.
477
478 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
479
480 PR ld/27590
481 * elf.c (_bfd_elf_make_section_from_shdr): Treat
482 .gnu.debuglto_.debug_ section as debugging section unless it is
483 marked with SHF_EXCLUDE.
484 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
485 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
486 matching non-debugging sections or linkonce section with comdat
487 section.
488
489 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
490
491 PR ld/27587
492 * dwarf2.c (read_attribute_value): Check version >= 3 for
493 DW_FORM_ref_addr.
494
495 2021-03-16 Nick Clifton <nickc@redhat.com>
496
497 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
498 overrun by using sizeof of the destination x_fname field as the
499 limit for a memcpy.
500
501 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
502
503 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
504
505 2021-03-12 Clément Chigot <clement.chigot@atos.net>
506
507 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
508 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
509 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
510 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
511 BFD_RELOC_PPC64_TLS_ML): New relocations.
512 * bfd-in2.h: Regenerate.
513 * libbfd.h: Regenerate.
514 * coff-rs6000.c (xcoff_calculate_relocation): Call
515 xcoff_reloc_type_tls for TLS relocations.
516 (xcoff_howto_table): Implement TLS relocations.
517 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
518 (xcoff_reloc_type_tls): New function.
519 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
520 (xcoff_howto_table): Likewise.
521 (_bfd_xcoff_reloc_type_lookup): Likewise.
522 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
523 (styp_to_sec_flags): Likewise.
524 (coff_compute_section_file_positions): Avoid file offset
525 optimisation for .data when the previous section is .tdata.
526 (coff_write_object_contents): Handle TLS sections.
527 * coffswap.h (coff_swap_aouthdr_out): Add support for
528 new fields in aouthdr.
529 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
530 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
531 (xcoff_need_ldrel_p): Add cases for TLS relocations.
532 (xcoff_create_ldrel): Add l_symndx for TLS sections.
533
534 2021-03-12 Clément Chigot <clement.chigot@atos.net>
535
536 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
537 New relocations.
538 * bfd-in2.h: Regenerate.
539 * libbfd.h: Regenerate.
540 * coff-rs6000.c (xcoff_calculate_relocation): Call
541 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
542 (xcoff_howto_table): Remove src_mask for TOC relocations.
543 Add R_TOCU and R_TOCL howtos.
544 (_bfd_xcoff_reloc_type_lookup): Add cases for
545 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
546 (xcoff_reloc_type_toc): Compute the whole offset.
547 Implement R_TOCU and R_TOCL.
548 * coff64-rs6000.c (xcoff64_calculate_relocation):
549 Likewise.
550 (xcoff64_howto_table): Likewise.
551 (xcoff64_reloc_type_lookup): Likewise.
552
553 2021-03-12 Clément Chigot <clement.chigot@atos.net>
554
555 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
556 add new relocations.
557 (xcoff_howto_table): Likewise.
558 (xcoff_rtype2howto): Increase r_type maximum value.
559 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
560 of create a new one from scratch. Enable only some relocations
561 to have a changing r_size.
562 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
563 (xcoff64_howto_table): Likewise.
564 (xcoff64_rtype2howto): Likewise.
565 (xcoff64_ppc_relocate_section): Likewise.
566 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
567
568 2021-03-12 Clément Chigot <clement.chigot@atos.net>
569
570 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
571
572 2021-03-12 Clément Chigot <clement.chigot@atos.net>
573
574 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
575 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
576 support for o_cputype field. Avoid creating an empty a.out header
577 for XCOFF64.
578
579 2021-03-12 Clément Chigot <clement.chigot@atos.net>
580
581 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
582 missing smclass.
583
584 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
585
586 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
587 restart_relax, used to check if we need to run the whole
588 relaxations from relax pass 0 to 2 again.
589 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
590 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
591 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
592 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
593 after_allocation to check if we need to run the whole relaxations again.
594 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
595 when the restart_relax is FALSE; At last set restart_relax to TRUE if
596 again is TRUE, too.
597 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
598 (bfd_elf64_riscv_restart_relax_sections): Likewise.
599
600 2021-03-10 Jan Beulich <jbeulich@suse.com>
601
602 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
603 offset.
604
605 2021-03-10 Alan Modra <amodra@gmail.com>
606 Jan Beulich <jbeulich@suse.com>
607
608 * elf.c (bfd_elf_generic_reloc): Make references between debug
609 sections use section relative values.
610
611 2021-03-09 Jan Beulich <jbeulich@suse.com>
612
613 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
614
615 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
616
617 PR ld/27425
618 PR ld/27432
619 * bfd.c (_bfd_get_link_info): New function.
620 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
621 (elf_link_info): New.
622 * libbfd-in.h (_bfd_get_link_info): New prototype.
623 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
624 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
625 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
626 (pex64_link_add_symbols): New function.
627 (coff_bfd_link_add_symbols): New macro.
628 * libbfd.h: Regenerated.
629
630 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
631 Andrew Burgess <andrew.burgess@embecosm.com>
632
633 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
634 * elf.c (elfcore_grok_riscv_csr): New function.
635 (elfcore_grok_note): Handle NT_RISCV_CSR.
636 (elfcore_write_riscv_csr): New function.
637 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
638
639 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
640 Andrew Burgess <andrew.burgess@embecosm.com>
641
642 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
643 (PRPSINFO_PR_PSARGS_LENGTH): Define.
644 (riscv_write_core_note): New function.
645 (riscv_elf_grok_psinfo): Make use of two new length defines.
646 (elf_backend_write_core_note): Define.
647
648 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
649 Andrew Burgess <andrew.burgess@embecosm.com>
650
651 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
652 * elf.c (elfcore_grok_gdb_tdesc): New function.
653 (elfcore_grok_note): Handle NT_GDB_TDESC.
654 (elfcore_write_gdb_tdesc): New function.
655 (elfcore_write_register_note): Handle NT_GDB_TDESC.
656
657 2021-03-05 Nick Clifton <nickc@redhat.com>
658
659 PR 27521
660 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
661 (read_indexed_string): Placeholder function.
662 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
663 forms.
664
665 2021-03-05 Alan Modra <amodra@gmail.com>
666
667 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
668 2020-09-16 changes.
669 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
670 adjustments here instead. Separate pc-relative adjustments
671 from symbol related adjustments. Tidy comments and formatting.
672
673 2021-03-04 Jan Beulich <jbeulich@suse.com>
674
675 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
676 final PE images.
677
678 2021-03-04 Alan Modra <amodra@gmail.com>
679
680 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
681
682 2021-03-03 Alan Modra <amodra@gmail.com>
683
684 PR 27500
685 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
686 processing not when start/stop symbol section is unmarked but
687 on first time a start/stop symbol is processed.
688
689 2021-03-03 Alan Modra <amodra@gmail.com>
690
691 * reloc.c: Include x86_64.h rather than internal.h.
692
693 2021-03-02 Nick Clifton <nickc@redhat.com>
694
695 PR 27484
696 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
697 function and variable tags and a second time to resolve their
698 attributes.
699
700 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
701
702 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
703
704 2021-03-02 Alan Modra <amodra@gmail.com>
705
706 PR 27451
707 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
708 linker defined start/stop symbols when start_stop_gc.
709
710 2021-03-02 Alan Modra <amodra@gmail.com>
711
712 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
713 indirect to pc-relative or toc-relative for undefined symbols.
714
715 2021-03-01 Alan Modra <amodra@gmail.com>
716 Fangrui Song <maskray@google.com>
717
718 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
719 defined start/stop symbols when start_stop_gc.
720 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
721 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
722 * linker.c (bfd_generic_define_start_stop): Likewise.
723
724 2021-02-25 Alan Modra <amodra@gmail.com>
725
726 PR 27441
727 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
728 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
729 use when deciding an as-needed library should be loaded instead
730 of using the binding of the library definition.
731
732 2021-02-24 Alan Modra <amodra@gmail.com>
733
734 PR 27459
735 * coff-stgo32.c (go32exe_check_format): Sanity check size of
736 header to avoid a buffer overflow.
737
738 2021-02-22 Alan Modra <amodra@gmail.com>
739
740 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
741 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
742
743 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
744
745 PR 27158
746 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
747 (_bfd_riscv_relax_call): Likewise.
748 (_bfd_riscv_relax_lui): Likewise.
749 * elfxx-riscv.c (howto_table): Likewise.
750
751 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
752
753 * Makefile.am: Added cpu-riscv.h.
754 * Makefile.in: Regenerated.
755 * po/SRC-POTFILES.in: Regenerated.
756 * cpu-riscv.h: Added to support spec versions controlling.
757 Also added extern arrays and functions for cpu-riscv.c.
758 (enum riscv_spec_class): Define all spec classes here uniformly.
759 (struct riscv_spec): Added for all specs.
760 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
761 (RISCV_GET_SPEC_NAME): Likewise.
762 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
763 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
764 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
765 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
766 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
767 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
768 (riscv_priv_specs): Moved below.
769 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
770 (riscv_isa_specs): Moved from include/opcode/riscv.h.
771 * elfnn-riscv.c: Included cpu-riscv.h.
772 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
773 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
774 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
775 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
776
777 2021-02-17 Alan Modra <amodra@gmail.com>
778
779 * wasm-module.c: Guard include of limits.h.
780 (CHAR_BIT): Provide backup define.
781 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
782 Correct signed overflow checking.
783
784 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
785
786 PR 27200
787 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
788 copying the elf flags from input BFD to output BFD, until we have
789 checked if the input BFD has no code section or not. Also fix the
790 problem that we only check the first section rather than the entire
791 sections for input BFD.
792
793 2021-02-16 Alan Modra <amodra@gmail.com>
794
795 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
796 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
797
798 2021-02-15 Jan Beulich <jbeulich@suse.com>
799
800 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
801 * doc/Makefile.in: Re-generate.
802
803 2021-02-15 Alan Modra <amodra@gmail.com>
804
805 * elf32-nds32.c (nds32_get_section_contents): Replace
806 bfd_malloc_and_get_section with bfd_get_full_section_contents.
807 (nds32_elf_relax_delete_blanks): Init contents.
808 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
809
810 2021-02-15 Alan Modra <amodra@gmail.com>
811
812 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
813 bfd_get_full_section_contents.
814
815 2021-02-14 Alan Modra <amodra@gmail.com>
816
817 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
818 all fixes to bfd_generic_get_relocated_section_contents since this
819 function was split out.
820
821 2021-02-11 Alan Modra <amodra@gmail.com>
822
823 * config.bfd: Remove ia64 from obsolete list.
824
825 2021-02-11 Alan Modra <amodra@gmail.com>
826
827 PR ld/22269
828 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
829
830 2021-02-11 Alan Modra <amodra@gmail.com>
831
832 PR 27294
833 * elf32-avr.c (avr_elf32_load_records_from_section): Use
834 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
835 unnecessary casts.
836
837 2021-02-11 Alan Modra <amodra@gmail.com>
838
839 PR 27291
840 * section.c (bfd_get_section_contents): Avoid possible overflow
841 when range checking offset and count.
842 (bfd_set_section_contents): Likewise.
843
844 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
845
846 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
847 favour of LIBINTL.
848 * configure: Regenerated.
849
850 2021-02-09 Alan Modra <amodra@gmail.com>
851
852 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
853 * configure.ac: Delete symbian entries.
854 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
855 * elf32-arm.c: Remove symbian support. Formatting.
856 * targets.c: Delete symbian entries.
857 * configure: Regenerate.
858
859 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
860
861 PR ld/19609
862 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
863 info when failed to convert GOTPCREL relocation.
864
865 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
866
867 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
868
869 2021-02-04 Alan Modra <amodra@gmail.com>
870
871 PR 27311
872 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
873 libraries for IR references on pass over libraries after LTO
874 recompilation.
875
876 2021-02-03 Alan Modra <amodra@gmail.com>
877
878 PR 27311
879 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
880 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
881 libraries when H is an indirect symbol after calling
882 _bfd_elf_add_default_symbol.
883
884 2021-02-03 Alan Modra <amodra@gmail.com>
885
886 PR 27311
887 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
888 undecorated symbol will have a different version.
889
890 2021-02-02 Alan Modra <amodra@gmail.com>
891
892 PR 27311
893 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
894 Use when handling default versioned symbol. Rename existing
895 override variable to nondef_override and use for non-default
896 versioned symbol.
897 (elf_link_add_object_symbols): Adjust call to suit. Don't
898 pull in as-needed libraries when override is set.
899
900 2021-02-01 Emery Hemingway <ehmry@posteo.net>
901
902 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
903
904 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
905
906 PR 27254
907 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
908 offset for the R_RL78_RH_SADDR relocation.
909
910 2021-01-29 Alan Modra <amodra@gmail.com>
911
912 PR 27271
913 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
914 on symbols defined in absolute or other special sections.
915
916 2021-01-28 Alan Modra <amodra@gmail.com>
917
918 PR 27259
919 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
920 prevent endless looping of linked-to sections.
921
922 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
923
924 * bfd-elf.h (elfcore_write_file_note): New function.
925 * elf.c (elfcore_write_file_note): New function.
926
927 2021-01-26 Alan Modra <amodra@gmail.com>
928
929 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
930
931 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
932
933 PR binutils/27231
934 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
935 number tables.
936
937 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
938
939 PR binutils/27231
940 * dwarf2.c (read_rnglists): Advance rngs_ptr after
941 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
942
943 2021-01-20 Alan Modra <amodra@gmail.com>
944
945 * elf32-ppc.c: Delete outdated comment.
946 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
947 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
948
949 2021-01-20 Alan Modra <amodra@gmail.com>
950
951 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
952 section symbols are present.
953
954 2021-01-19 Alan Modra <amodra@gmail.com>
955
956 * elf64-ppc.c (elf_hash_entry): New inline function. Use
957 throughout to replace casts.
958 (branch_reloc_hash_match): Remove const from params.
959 (use_local_plt): New function.
960 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
961 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
962 Use use_local_plt.
963 * elf32-ppc.c (use_local_plt): New function.
964 (allocate_dynrelocs, ppc_elf_relocate_section),
965 (write_global_sym_plt): Use use_local_plt.
966
967 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
968
969 PR ld/27193
970 * elflink.c (elf_create_symbuf): Also ignore section symbols.
971
972 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
973
974 PR ld/23169
975 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
976 check pointer_equality_needed.
977
978 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
979
980 * elf-linker-x86.h (elf_linker_x86_params): Add
981 report_relative_reloc.
982 * elf32-i386.c (elf_i386_relocate_section): Call
983 _bfd_x86_elf_link_report_relative_reloc to report relative
984 relocations for -z report-relative-reloc.
985 (elf_i386_finish_dynamic_symbol): Likewse.
986 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
987 (elf_x86_64_finish_dynamic_symbol): Likewse.
988 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
989 function.
990 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
991 prototype.
992
993 2021-01-16 Alan Modra <amodra@gmail.com>
994
995 * compress.c (decompress_contents): Tidy inflateEnd result test.
996
997 2021-01-16 Alan Modra <amodra@gmail.com>
998
999 PR 26002
1000 * elflink.c (elf_link_output_extsym): Use version 1 in
1001 .gnu.version for undefined unversioned symbols.
1002
1003 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1004
1005 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
1006 caused the by previous commit accidentally.
1007
1008 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1009
1010 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
1011 also aligned the code.
1012
1013 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1014
1015 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
1016
1017 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1018
1019 * elfnn-riscv.c: Comments tidy and improvement.
1020 * elfxx-riscv.c: Likewise.
1021 * elfxx-riscv.h: Likewise.
1022
1023 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
1024
1025 PR ld/26688
1026 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1027 section for R_BFIN_FUNCDESC.
1028
1029 2021-01-14 Nick Clifton <nickc@redhat.com>
1030
1031 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
1032
1033 2021-01-13 Alan Modra <amodra@gmail.com>
1034
1035 * Makefile.in: Regenerate.
1036 * doc/Makefile.in: Regenerate.
1037
1038 2021-01-13 Alan Modra <amodra@gmail.com>
1039
1040 PR 27160
1041 * section.c (struct bfd_section): Remove pattern field.
1042 (BFD_FAKE_SECTION): Adjust to suit.
1043 * bfd-in2.h: Regenerate.
1044 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
1045 (bfd_elf_final_link): Don't call elf_fixup_link_order.
1046
1047 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1048
1049 PR binutils/26792
1050 * configure.ac: Use GNU_MAKE_JOBSERVER.
1051 * aclocal.m4: Regenerated.
1052 * configure: Likewise.
1053
1054 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 PR ld/27171
1057 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
1058 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
1059
1060 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1061
1062 PR ld/27173
1063 * configure: Regenerated.
1064
1065 2021-01-11 Nick Clifton <nickc@redhat.com>
1066
1067 * po/fr.po: Updated French translation.
1068 * po/pt.po: Updated Portuguese translation.
1069 * po/sr.po: Updated Serbian translation.
1070 * po/uk.po: Updated Ukranian translation.
1071
1072 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * configure: Regenerated.
1075
1076 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1077
1078 PR ld/27166
1079 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
1080 -z lam-u48 and -z lam-u57.
1081
1082 2021-01-09 Nick Clifton <nickc@redhat.com>
1083
1084 * version.m4: Change to 2.36.50.
1085 * configure: Regenerate.
1086 * po/bfd.pot: Regenerate.
1087
1088 2021-01-09 Nick Clifton <nickc@redhat.com>
1089
1090 * 2.36 release branch crated.
1091
1092 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
1095 LAM_U57 when setting LAM_U48.
1096
1097 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1098
1099 PR ld/26256
1100 PR ld/27160
1101 * elflink.c (elf_fixup_link_order): Verify that fixing up
1102 SHF_LINK_ORDER doesn't increase the output section size.
1103
1104 2021-01-09 Alan Modra <amodra@gmail.com>
1105
1106 * configure: Regenerate.
1107
1108 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1109
1110 * configure: Regenerate.
1111
1112 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1113
1114 PR 27109
1115 * aix386-core.c (core_aix386_vec): Initialize
1116 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
1117 * aout-target.h (MY (vec)): Likewise.
1118 * binary.c (binary_vec): Likewise.
1119 * cisco-core.c (core_cisco_be_vec): Likewise.
1120 (core_cisco_le_vec): Likewise.
1121 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
1122 * coff-i386.c (TARGET_SYM): Likewise.
1123 (TARGET_SYM_BIG): Likewise.
1124 * coff-ia64.c (TARGET_SYM): Likewise.
1125 * coff-mips.c (mips_ecoff_le_vec): Likewise.
1126 (mips_ecoff_be_vec): Likewise.
1127 (mips_ecoff_bele_vec): Likewise.
1128 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
1129 (powerpc_xcoff_vec): Likewise.
1130 * coff-sh.c (sh_coff_small_vec): Likewise.
1131 (sh_coff_small_le_vec): Likewise.
1132 * coff-tic30.c (tic30_coff_vec): Likewise.
1133 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
1134 (tic54x_coff0_beh_vec): Likewise.
1135 (tic54x_coff1_vec): Likewise.
1136 (tic54x_coff1_beh_vec): Likewise.
1137 (tic54x_coff2_vec): Likewise.
1138 (tic54x_coff2_beh_vec): Likewise.
1139 * coff-x86_64.c (TARGET_SYM): Likewise.
1140 (TARGET_SYM_BIG): Likewise.
1141 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
1142 (rs6000_xcoff64_aix_vec): Likewise.
1143 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
1144 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
1145 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
1146 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
1147 (TARGET_LITTLE_SYM): Likewise.
1148 * hppabsd-core.c (core_hppabsd_vec): Likewise.
1149 * hpux-core.c (core_hpux_vec): Likewise.
1150 * i386msdos.c (i386_msdos_vec): Likewise.
1151 * ihex.c (ihex_vec): Likewise.
1152 * irix-core.c (core_irix_vec): Likewise.
1153 * mach-o-target.c (TARGET_NAME): Likewise.
1154 * mmo.c (mmix_mmo_vec): Likewise.
1155 * netbsd-core.c (core_netbsd_vec): Likewise.
1156 * osf-core.c (core_osf_vec): Likewise.
1157 * pdp11.c (MY (vec)): Likewise.
1158 * pef.c (pef_vec): Likewise.
1159 (pef_xlib_vec): Likewise.
1160 * plugin.c (plugin_vec): Likewise.
1161 * ppcboot.c (powerpc_boot_vec): Likewise.
1162 * ptrace-core.c (core_ptrace_vec): Likewise.
1163 * sco5-core.c (core_sco5_vec): Likewise.
1164 * som.c (hppa_som_vec): Likewise.
1165 * srec.c (srec_vec): Likewise.
1166 (symbolsrec_vec): Likewise.
1167 * tekhex.c (tekhex_vec): Likewise.
1168 * trad-core.c (core_trad_vec): Likewise.
1169 * verilog.c (verilog_vec): Likewise.
1170 * vms-alpha.c (alpha_vms_vec): Likewise.
1171 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
1172 * wasm-module.c (wasm_vec): Likewise.
1173 * xsym.c (sym_vec): Likewise.
1174 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
1175 isn't set.
1176 (elf_map_symbols): Don't include ignored section symbols.
1177 * elfcode.h (elf_slurp_symbol_table): Also set
1178 BSF_SECTION_SYM_USED on STT_SECTION symbols.
1179 * elflink.c (bfd_elf_final_link): Generated section symbols only
1180 when emitting relocations or reqired.
1181 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1182 * syms.c (BSF_SECTION_SYM_USED): New.
1183 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1184 (bfd_target): Add keep_unused_section_symbols.
1185 (bfd_keep_unused_section_symbols): New.
1186 * bfd-in2.h: Regenerated.
1187
1188 2021-01-07 Nick Clifton <nickc@redhat.com>
1189
1190 PR 25713
1191 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
1192 absolute paths and check to see if they are longer than MAX_PATH.
1193
1194 2021-01-07 Philipp Tomsich <prt@gnu.org>
1195
1196 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
1197
1198 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
1199 Jim Wilson <jimw@sifive.com>
1200 Andrew Waterman <andrew@sifive.com>
1201 Maxim Blinov <maxim.blinov@embecosm.com>
1202 Kito Cheng <kito.cheng@sifive.com>
1203 Nelson Chu <nelson.chu@sifive.com>
1204
1205 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
1206
1207 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
1208
1209 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
1210 (bfinfdpic_check_relocs): Likewise.
1211
1212 2021-01-06 Alan Modra <amodra@gmail.com>
1213
1214 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
1215 on unknown r_type.
1216 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1217
1218 2021-01-06 Alan Modra <amodra@gmail.com>
1219
1220 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
1221 (sparc64-*-solaris2*): Add sparc_elf64_vec and
1222 sparc_elf32_vec.
1223
1224 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
1225
1226 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
1227 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
1228 * configure.ac: Handle riscv_elf[32|64]_be_vec.
1229 * configure: Regenerate.
1230 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
1231 riscv_is_insn_reloc.
1232 (riscv_get_insn): RISC-V instructions are always little endian, but
1233 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
1234 the insturctions.
1235 (riscv_put_insn): Likewsie.
1236 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
1237 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
1238 use riscv_[get|put]_insn or bfd_[get|put].
1239 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
1240 or bfd_[get|put]l16 for code.
1241 (riscv_elf_relocate_section): Likewise.
1242 (riscv_elf_finish_dynamic_symbol): Likewise.
1243 (riscv_elf_finish_dynamic_sections): Likewise.
1244 (_bfd_riscv_relax_call): Likewise.
1245 (_bfd_riscv_relax_lui): Likewise.
1246 (_bfd_riscv_relax_align): Likewise.
1247 (_bfd_riscv_relax_pc): Likewise.
1248 (riscv_elf_object_p): Handled for big endian.
1249 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
1250 * targets.c: Add riscv_elf[32|64]_be_vec.
1251 (_bfd_target_vector): Likewise.
1252
1253 2021-01-05 Alan Modra <amodra@gmail.com>
1254
1255 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
1256 for relocatable executable.
1257
1258 2021-01-05 Alan Modra <amodra@gmail.com>
1259
1260 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
1261
1262 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
1263
1264 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
1265 make sure gp symbol is output as a dynamic symbol.
1266
1267 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
1268
1269 PR ld/26256
1270 * elflink.c (compare_link_order): Place unordered sections before
1271 ordered sections.
1272 (elf_fixup_link_order): Add a link info argument. Allow mixed
1273 ordered and unordered input sections for non-relocatable link.
1274 Sort the consecutive bfd_indirect_link_order sections with the
1275 same pattern. Change the offsets of the bfd_indirect_link_order
1276 sections only.
1277 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
1278 * section.c (bfd_section): Add pattern.
1279 (BFD_FAKE_SECTION): Initialize pattern to NULL.
1280 * bfd-in2.h: Regenerated.
1281
1282 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
1283
1284 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
1285 of private flags with 0x.
1286 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
1287
1288 2021-01-04 Alan Modra <amodra@gmail.com>
1289
1290 PR 26822
1291 * elflink.c (elf_link_input_bfd): Use the file base name in
1292 linker generated STT_FILE symbols.
1293
1294 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
1295
1296 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
1297 * elfxx-riscv.h: Add declaration.
1298 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
1299 riscv_compare_subsets to check the orders.
1300 (riscv_skip_prefix): Removed.
1301 (riscv_prefix_cmp): Removed.
1302
1303 2021-01-04 Alan Modra <amodra@gmail.com>
1304
1305 PR 26741
1306 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
1307 calculating subset version length.
1308
1309 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1310
1311 * xcofflink.c: Correct spelling in comments.
1312
1313 2021-01-01 Alan Modra <amodra@gmail.com>
1314
1315 Update year range in copyright notice of all files.
1316
1317 For older changes see ChangeLog-2020
1318 \f
1319 Copyright (C) 2021 Free Software Foundation, Inc.
1320
1321 Copying and distribution of this file, with or without modification,
1322 are permitted in any medium without royalty provided the copyright
1323 notice and this notice are preserved.
1324
1325 Local Variables:
1326 mode: change-log
1327 left-margin: 8
1328 fill-column: 74
1329 version-control: never
1330 End:
This page took 0.056841 seconds and 5 git commands to generate.