Commit | Line | Data |
---|---|---|
610ed3e0 JB |
1 | 2020-08-21 Jan Beulich <jbeulich@suse.com> |
2 | ||
3 | * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check | |
4 | last byte of debug dir, not first. | |
5 | ||
01147b20 NC |
6 | 2020-08-20 Nick Clifton <nickc@redhat.com> |
7 | ||
8 | PR 26428 | |
9 | * bfd.c (bfd_update_compression_header): Also set the sh_addralign | |
10 | field in the ELF header of the compressed sections. | |
11 | ||
44466e45 NC |
12 | 2020-08-20 Nick Clifton <nickc@redhat.com> |
13 | ||
14 | PR 26406 | |
15 | * elf-bfd.h (struct bfd_elf_section_data): Add | |
16 | has_secondary_relocs field. | |
17 | * elf.c (_bfd_elf_copy_special_section_fields): Set the | |
18 | has_secondary_relocs field for sections which have associated | |
19 | secondary relocs. | |
20 | * elfcode.h (elf_write_relocs): Only call write_secondary_relocs | |
21 | on sections which have associated secondary relocs. | |
22 | ||
10885e24 AM |
23 | 2020-08-15 Alan Modra <amodra@gmail.com> |
24 | ||
25 | * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on | |
26 | small common section. | |
27 | * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise. | |
28 | * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise. | |
29 | * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise. | |
30 | * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise. | |
31 | * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. | |
32 | * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise. | |
33 | * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise. | |
34 | * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise. | |
35 | * elf32-v850.c (v850_elf_check_relocs): Likewise. | |
36 | (v850_elf_add_symbol_hook): Likewise. | |
37 | * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. | |
38 | * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise. | |
39 | * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise. | |
40 | * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. | |
41 | ||
4d182367 AM |
42 | 2020-08-15 Alan Modra <amodra@gmail.com> |
43 | ||
44 | PR 26389 | |
45 | * syms.c (bfd_decode_symclass): Choose 'c' for commons only when | |
46 | SEC_SMALL_DATA. | |
47 | * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA | |
48 | on small common section. | |
49 | * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise. | |
50 | * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise. | |
51 | * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise. | |
52 | * elf32-v850.c (v850_elf_symbol_processing): Likewise. | |
53 | * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise. | |
54 | * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise. | |
55 | ||
19bddbe9 AM |
56 | 2020-08-14 Alan Modra <amodra@gmail.com> |
57 | ||
58 | * hash.c (bfd_hash_set_default_size): Use higher_prime_number | |
59 | rather than another copy of primes. Increase maximum default | |
60 | size allowed. | |
61 | ||
2b6ba032 AM |
62 | 2020-08-13 Alan Modra <amodra@gmail.com> |
63 | ||
73d0dc16 | 64 | * config.bfd: Obsolete arm*-*-symbianelf*, and ia64*-*-*. |
2b6ba032 | 65 | |
6738c8a7 AM |
66 | 2020-08-13 Alan Modra <amodra@gmail.com> |
67 | ||
68 | * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt. | |
69 | * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc | |
70 | optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT | |
71 | optimization when --no-pcrel-optimize. | |
72 | ||
75e100a3 AM |
73 | 2020-08-13 Alan Modra <amodra@gmail.com> |
74 | ||
75 | PR 26348 | |
76 | * bfd.c (struct bfd): Add read_only. | |
77 | * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size. | |
78 | Set read_only on warning. | |
79 | (elf_object_p): Sanity check program header alignment. Set | |
80 | read_only on warning. | |
81 | * bfd-in2.h: Regenerate. | |
82 | ||
2fef9373 JT |
83 | 2020-08-12 Jon Turney <jon.turney@dronecode.org.uk> |
84 | ||
85 | * elf.c (elfcore_grok_win32pstatus): Use unsigned int for | |
86 | win32pstatus note type to avoid signedness comparison warning. | |
87 | ||
404ec933 JT |
88 | 2020-07-21 Jon Turney <jon.turney@dronecode.org.uk> |
89 | ||
90 | * elf.c (elfcore_grok_win32pstatus): Warn on malformed | |
91 | win32pstatus notes, and return TRUE so we continue rather than | |
92 | stopping as if it was an error. | |
93 | ||
d61f3d03 JT |
94 | 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk> |
95 | ||
96 | * elf.c (elfcore_grok_win32pstatus): Handle NOTE_INFO_MODULE64. | |
97 | ||
04ec0fa2 JT |
98 | 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk> |
99 | ||
100 | * elf.c (elfcore_grok_win32pstatus): Don't apply size constraint | |
101 | for NOTE_INFO_THREAD to all win32pstatus ELF notes, instead apply | |
102 | appropriate size constraint for each win32pstatus note type. | |
103 | ||
03c29a6f JT |
104 | 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk> |
105 | ||
106 | * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of | |
107 | the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD | |
108 | win32pstatus note. | |
109 | ||
8fbac78b JT |
110 | 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk> |
111 | ||
112 | * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define. | |
113 | (elfcore_grok_win32pstatus): Use. | |
114 | ||
ff2084b9 JT |
115 | 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk> |
116 | ||
117 | * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read | |
118 | the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix | |
119 | offsets used to read NOTE_INFO_PROCESS. | |
120 | ||
79ddc884 NC |
121 | 2020-08-12 Nick Clifton <nickc@redhat.com> |
122 | ||
123 | * po/ru.po: Updated Russian translation. | |
124 | * po/sr.po: Updated Serbian translation. | |
125 | ||
d844f10a DF |
126 | 2020-08-07 David Faust <david.faust@oracle.com> |
127 | ||
128 | * elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for | |
129 | DISP16 and DISP32 relocations. | |
130 | ||
3ee9565c DF |
131 | 2020-08-05 David Faust <david.faust@oracle.com> |
132 | ||
133 | * elf64-bpf.c (bpf_elf_generic_reloc): New function. | |
134 | (bpf_elf_howto_table): Use it here. | |
135 | (bpf_elf_relocate_section): Use addends recorded in input_bfd for | |
136 | instruction and data relocations. | |
137 | ||
e44a1d7b AM |
138 | 2020-08-03 Alan Modra <amodra@gmail.com> |
139 | ||
140 | * vms-lib.c (vms_traverse_index): Sanity check size remaining | |
141 | before accessing vms_idx or vms_elfidx. | |
142 | ||
b5f386d5 AM |
143 | 2020-08-03 Alan Modra <amodra@gmail.com> |
144 | ||
145 | PR 26330 | |
146 | * elf.c (_bfd_elf_get_symtab_upper_bound): Sanity check symbol table | |
147 | size against file size. Correct LONG_MAX limit check. | |
148 | (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise. | |
149 | (_bfd_elf_get_reloc_upper_bound): Don't check file size if writing. | |
150 | (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise. | |
151 | * elf64-x86-64-.c (elf_x86_64_get_synthetic_symtab): Use | |
152 | bfd_malloc_and_get_section. | |
153 | ||
a896df97 AM |
154 | 2020-07-31 Alan Modra <amodra@gmail.com> |
155 | ||
156 | PR 26314 | |
157 | * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't allow | |
158 | IR symbols to become dynamic. | |
159 | (elf_link_add_object_symbols): Don't exclude IR symbols when | |
160 | deciding whether an as-needed shared library is needed. | |
161 | ||
4d3bb356 SN |
162 | 2020-07-30 Szabolcs Nagy <szabolcs.nagy@arm.com> |
163 | ||
164 | PR ld/26312 | |
165 | * elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize | |
166 | to 0. | |
167 | (elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting. | |
168 | ||
c8693053 RO |
169 | 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
170 | ||
171 | * bfd.m4 (BFD_SYS_PROCFS_H): New macro. | |
172 | (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H. | |
173 | Don't define _STRUCTURED_PROC. | |
174 | (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. | |
175 | * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define. | |
176 | * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>. | |
177 | * configure, config.in: Regenerate. | |
178 | * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. | |
179 | * Makefile.in, doc/Makefile.in: Regenerate. | |
180 | ||
f1dfbfdb L |
181 | 2020-07-30 H.J. Lu <hongjiu.lu@intel.com> |
182 | ||
183 | * elf-bfd.h (sym_cache): Moved before elf_link_hash_table. | |
184 | (elf_link_hash_table): Add sym_cache. | |
185 | * elf32-arm.c (elf32_arm_link_hash_table): Remove sym_cache. | |
186 | (elf32_arm_check_relocs): Updated. | |
187 | (elf32_arm_size_dynamic_sections): Likewise. | |
188 | * elf32-bfin.c (bfin_link_hash_table): Removed. | |
189 | (bfin_link_hash_newfunc): Updated. | |
190 | (bfin_hash_table): Removed. | |
191 | * elf32-csky.c (csky_elf_link_hash_table): Remove sym_cache. | |
192 | (csky_elf_check_relocs): Updated. | |
193 | * elf32-hppa.c (elf32_hppa_link_hash_table): Remove sym_cache. | |
194 | (elf32_hppa_check_relocs): Updated. | |
195 | * elf32-i386.c (elf_i386_tls_transition): Updated. | |
196 | (elf_i386_convert_load_reloc): Likewise. | |
197 | (elf_i386_check_relocs): Likewise. | |
198 | * elf32-m32r.c (elf_m32r_link_hash_table): Removed. | |
199 | (m32r_elf_hash_table): Updated. | |
200 | (m32r_elf_link_hash_table_create): Likewise. | |
201 | (m32r_elf_create_dynamic_sections): Likewise. | |
202 | (m32r_elf_adjust_dynamic_symbol): Likewise. | |
203 | (allocate_dynrelocs): Likewise. | |
204 | (m32r_elf_size_dynamic_sections): Likewise. | |
205 | (m32r_elf_relocate_section): Likewise. | |
206 | (m32r_elf_finish_dynamic_symbol): Likewise. | |
207 | (m32r_elf_check_relocs): Likewise. | |
208 | * elf32-m68hc1x.h (m68hc11_elf_link_hash_table): Remove | |
209 | sym_cache. | |
210 | * elf32-m68k.c (elf_m68k_link_hash_table): Likewise. | |
211 | (elf_m68k_check_relocs): Updated. | |
212 | * elf32-metag.c (elf_metag_link_hash_table): Remove sym_cache. | |
213 | (elf_metag_check_relocs): Updated. | |
214 | * elf32-microblaze.c (elf32_mb_link_hash_table): Remove sym_sec. | |
215 | (microblaze_elf_check_relocs): Updated. | |
216 | * elf32-nds32.c (nds32_elf_link_hash_table_create): Likewise. | |
217 | (nds32_elf_create_dynamic_sections): Likewise. | |
218 | (nds32_elf_adjust_dynamic_symbol): Likewise. | |
219 | (nds32_elf_check_relocs): Likewise. | |
220 | * elf32-nds32.h (elf_nds32_link_hash_table): Remove sdynbss, | |
221 | srelbss and aym_cache. | |
222 | * elf32-nios2.c (elf32_nios2_link_hash_table): Remove sym_cache. | |
223 | (nios2_elf32_check_relocs): Updated. | |
224 | * elf32-or1k.c (elf_or1k_link_hash_table): Remove sym_sec. | |
225 | (or1k_elf_check_relocs): Updated. | |
226 | * elf32-ppc.c (ppc_elf_check_relocs): Remove sym_cache. | |
227 | (ppc_elf_check_relocs): Updated. | |
228 | * elf32-s390.c (elf_s390_link_hash_table): Remove sym_cache. | |
229 | (elf_s390_check_relocs): Updated. | |
230 | (elf_s390_finish_dynamic_sections): Likewise. | |
231 | * elf32-sh.c (elf_sh_link_hash_table): Remove sdynbss, srelbss | |
232 | and aym_cache. | |
233 | (sh_elf_create_dynamic_sections): Updated. | |
234 | (sh_elf_adjust_dynamic_symbol): Likewise. | |
235 | (sh_elf_size_dynamic_sections): Likewise. | |
236 | (sh_elf_check_relocs): Likewise. | |
237 | * elf32-tic6x.c (elf32_tic6x_link_hash_table): Remove sym_cache. | |
238 | (elf32_tic6x_check_relocs): Updated. | |
239 | * elf32-tilepro.c (tilepro_elf_link_hash_table): Removed. | |
240 | (tilepro_elf_hash_table): Updated. | |
241 | (tilepro_elf_link_hash_table_create): Likewise. | |
242 | (tilepro_elf_check_relocs): Likewise. | |
243 | (tilepro_elf_adjust_dynamic_symbol): Likewise. | |
244 | (allocate_dynrelocs): Likewise. | |
245 | (tilepro_elf_size_dynamic_sections): Likewise. | |
246 | (tilepro_elf_relocate_section): Likewise. | |
247 | (tilepro_elf_finish_dynamic_symbol): Likewise. | |
248 | (tilepro_finish_dyn): Likewise. | |
249 | (tilepro_elf_finish_dynamic_sections): Likewise. | |
250 | * elf64-ppc.c (ppc_link_hash_table): Remove sym_cache. | |
251 | (ppc64_elf_before_check_relocs): Updated. | |
252 | (ppc64_elf_check_relocs): Likewise. | |
253 | * elf64-s390.c (elf_s390_link_hash_table): Remove sym_cache. | |
254 | (elf_s390_check_relocs): Updated. | |
255 | (elf_s390_relocate_section): Likewise. | |
256 | (elf_s390_finish_dynamic_sections): Likewise. | |
257 | * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. | |
258 | (elf_x86_64_check_relocs): Likewise. | |
259 | * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove | |
260 | sym_cache. | |
261 | (elfNN_aarch64_check_relocs): Updated. | |
262 | * elfnn-riscv.c (riscv_elf_link_hash_table): Remove sym_cache. | |
263 | (riscv_elf_check_relocs): Updated. | |
264 | * elfxx-mips.c (mips_elf_link_hash_table): Remove sym_cache. | |
265 | (mips_elf_resolve_got_page_ref): Updated. | |
266 | * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. | |
267 | * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove | |
268 | sym_cache. | |
269 | * elfxx-tilegx.c (tilegx_elf_link_hash_table): Likewise. | |
270 | (tilegx_elf_check_relocs): Updated. | |
271 | * elfxx-x86.h (elf_x86_link_hash_table): Remove sym_cache. | |
272 | ||
c77cb2a0 MR |
273 | 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org> |
274 | ||
275 | * elflink.c (bfd_elf_final_link): Give local symbols a name if | |
276 | so requested. | |
277 | * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): Only | |
278 | return TRUE if making ET_REL output. | |
279 | ||
3f1b17bb MR |
280 | 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org> |
281 | ||
282 | * elf-bfd.h (elf_backend_data): Add | |
283 | `elf_backend_elfsym_local_is_section' member. | |
284 | * elfxx-target.h (elf_backend_elfsym_local_is_section): New | |
285 | macro. | |
286 | (elfNN_bed): Add `elf_backend_elfsym_local_is_section' member. | |
287 | * elflink.c (bfd_elf_final_link): Use it to determine whether | |
288 | set the `.symtab' section's `sh_info' value to the index of the | |
289 | first non-local or non-section symbol. | |
290 | * elf32-mips.c (mips_elf32_elfsym_local_is_section): New | |
291 | function. | |
292 | (elf_backend_elfsym_local_is_section): New macro. | |
293 | * elfn32-mips.c (mips_elf_n32_elfsym_local_is_section): New | |
294 | function. | |
295 | (elf_backend_elfsym_local_is_section): New macro. | |
296 | ||
4d68fd75 AM |
297 | 2020-07-29 Alan Modra <amodra@gmail.com> |
298 | ||
299 | * elflink.c (bfd_elf_final_link): Don't segfault on local dynsyms | |
300 | defined in excluded sections. | |
301 | ||
67411cbf AM |
302 | 2020-07-28 Alan Modra <amodra@gmail.com> |
303 | ||
304 | * elf.c (assign_section_numbers): Comment. Don't segfault on | |
305 | discarded sections when setting linked-to section for generic | |
306 | ELF linker. | |
307 | * elflink.c (bfd_elf_match_symbols_in_sections): Allow NULL info. | |
308 | ||
93fd13c7 AM |
309 | 2020-07-27 Alan Modra <amodra@gmail.com> |
310 | ||
311 | * xcofflink.c (xcoff_need_ldrel_p): Accept --just-symbols symbols and | |
312 | similar as absolute. | |
313 | (bfd_xcoff_import_symbol): Don't fuss over absolute symbol | |
314 | redefinitions here. | |
315 | ||
04f096fb NC |
316 | 2020-07-24 Nick Clifton <nickc@redhat.com> |
317 | ||
318 | * config.bfd: Move xc16x target to the obsolete list. | |
319 | ||
5efb6779 KB |
320 | 2020-07-22 Kevin Buettner <kevinb@redhat.com> |
321 | ||
322 | * binary.c (binary_get_section_contents): Seek using offset | |
323 | from section's file position. | |
324 | ||
ea57e509 KB |
325 | 2020-07-22 Kevin Buettner <kevinb@redhat.com> |
326 | ||
327 | * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB. | |
04f096fb | 328 | |
1ad2776d MF |
329 | 2020-07-22 Max Filippov <jcmvbkbc@gmail.com> |
330 | ||
331 | PR 26246 | |
332 | * elf32-xtensa.c (removed_literal_compare): Use correct pointer | |
333 | type for the first function argument. Rename pointers to reflect | |
334 | that they have distinct types. | |
335 | ||
2f5541f3 AM |
336 | 2020-07-20 Alan Modra <amodra@gmail.com> |
337 | ||
338 | * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section. | |
339 | ||
e10a07b3 AM |
340 | 2020-07-19 Alan Modra <amodra@gmail.com> |
341 | ||
342 | * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs. | |
343 | (select_alt_stub): New function. | |
344 | (ppc_get_stub_entry): Use it here. | |
345 | (ppc64_elf_check_relocs): Set had_power10_relocs rather than | |
346 | power10_stubs. | |
347 | (ppc64_elf_size_stubs): Clear power10_stubs here instead. Don't | |
348 | merge notoc stubs with other varieties when power10_stubs is "auto". | |
349 | Instead dup the stub hash table entry. | |
350 | (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust | |
351 | tests of power10_stubs. | |
352 | ||
28b80303 AM |
353 | 2020-07-15 Alan Modra <amodra@gmail.com> |
354 | ||
355 | PR 26239 | |
356 | * coffgen.c (_bfd_coff_close_and_cleanup): Free dwarf2 info. | |
357 | ||
4fd8d585 NC |
358 | 2020-07-15 Nick Clifton <nickc@redhat.com> |
359 | ||
360 | PR26240 | |
361 | * coffgen.c (coff_get_normalized_symtab): Fix off-by-one error in | |
362 | check for aux entries that overflow the buufer. | |
363 | ||
a8a48c75 HPN |
364 | 2020-07-15 Hans-Peter Nilsson <hp@bitrange.com> |
365 | ||
366 | * elf64-mmix.c (mmix_elf_relax_section): Improve accounting for | |
367 | R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols. | |
368 | ||
e8a83e93 MB |
369 | 2020-07-15 Markus Böck <markus.boeck02@gmail.com> |
370 | Alan Modra <amodra@gmail.com> | |
371 | ||
372 | PR 26198 | |
373 | * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin | |
374 | objects both before and after normal object files. | |
375 | * elflink.c (_bfd_elf_section_already_linked): Likewise. | |
376 | ||
d3b10ee7 AM |
377 | 2020-07-10 Alan Modra <amodra@gmail.com> |
378 | ||
379 | * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs. | |
380 | * elf64-ppc.c (struct ppc_link_hash_table): Delete | |
381 | power10_stubs. | |
382 | (ppc64_elf_check_relocs): Adjust setting of power10_stubs. | |
383 | (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust | |
384 | uses of power10_stubs. | |
385 | ||
fe49679d AM |
386 | 2020-07-09 Alan Modra <amodra@gmail.com> |
387 | ||
388 | * coff-ppc.c: Delete. | |
389 | * pe-ppc.c: Delete. | |
390 | * pei-ppc.c: Delete. | |
391 | * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC. | |
392 | * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove | |
393 | PPCMAGIC code. | |
394 | (coff_write_object_contents): Remove PPC_PE code. | |
395 | * config.bfd: Move powerpcle-pe to removed targets. | |
396 | * configure.ac: Remove powerpc PE entries. | |
397 | * libcoff-in.h (ppc_allocate_toc_section): Delete. | |
398 | (ppc_process_before_allocation): Delete. | |
399 | * peXXigen.c: Remove POWERPC_LE_PE code and comments. | |
400 | * targets.c: Remove powerpc PE vectors. | |
401 | * po/SRC-POTFILES.in: Regenerate. | |
402 | * libcoff.h: Regenerate. | |
403 | * Makefile.in: Regenerate. | |
404 | * configure: Regenerate. | |
405 | ||
7646efdf NC |
406 | 2020-07-09 Nick Clifton <nickc@redhat.com> |
407 | ||
408 | * po/fr.po: Updated French translation. | |
409 | ||
23f5e55e AM |
410 | 2020-07-07 Alan Modra <amodra@gmail.com> |
411 | ||
412 | * xcofflink.c (xcoff_mark): Don't mark const sections. | |
413 | (bfd_xcoff_record_link_assignment): Add FIXME. | |
414 | (_bfd_xcoff_bfd_final_link): Don't segfault on assorted magic | |
415 | sections being discarded by linker script. | |
416 | ||
c8001886 AM |
417 | 2020-07-07 Alan Modra <amodra@gmail.com> |
418 | ||
419 | * coff-rs6000.c (xcoff_write_archive_contents_old): Set default | |
420 | time, uid, gid and mode for deterministic archive. | |
421 | (xcoff_write_archive_contents_big): Likewise. | |
422 | ||
8af7926f AM |
423 | 2020-07-07 Alan Modra <amodra@gmail.com> |
424 | ||
425 | * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and | |
426 | C_AIX_WEAKEXT. | |
427 | ||
17550be7 NC |
428 | 2020-07-06 Nick Clifton <nickc@redhat.com> |
429 | ||
430 | * po/pt.po: Updated Portuguese translation. | |
431 | * po/uk.po: Updated Ukranian translation. | |
432 | ||
b4396c5e NC |
433 | 2020-07-04 Nick Clifton <nickc@redhat.com> |
434 | ||
435 | * version.m4: Set version to 2.35.50. | |
436 | * configure: Regenerate. | |
437 | * po/bbfd.pot: Regenerate. | |
438 | ||
b115b9fd NC |
439 | 2020-07-04 Nick Clifton <nickc@redhat.com> |
440 | ||
441 | Binutils 2.35 branch created. | |
442 | ||
33d1369f AM |
443 | 2020-07-01 Alan Modra <amodra@gmail.com> |
444 | ||
445 | PR 26188 | |
446 | * coffgen.c (coff_find_nearest_line_with_names): Sanity check | |
447 | raw syment index before dereferencing. | |
448 | ||
cc574a35 AM |
449 | 2020-07-01 Alan Modra <amodra@gmail.com> |
450 | ||
451 | * elf32-i386.c (elf_backend_object_p): Undef for vxworks. | |
452 | ||
3443489c AM |
453 | 2020-07-01 Alan Modra <amodra@gmail.com> |
454 | ||
455 | * config.bfd: Obsolete xc16x. | |
456 | ||
bbd19b19 L |
457 | 2020-06-30 H.J. Lu <hongjiu.lu@intel.com> |
458 | ||
459 | * archures.c (bfd_mach_i386_nacl): Removed. | |
460 | (bfd_mach_i386_i386_nacl): Likewise. | |
461 | (bfd_mach_x86_64_nacl): Likewise. | |
462 | (bfd_mach_x64_32_nacl): Likewise. | |
463 | * config.bfd: Remove *-*-nacl* targets. | |
464 | * configure.ac: Remove x86 NaCl target vectors. | |
465 | * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed. | |
466 | (bfd_x64_32_nacl_arch): Likewise. | |
467 | (bfd_x86_64_nacl_arch): Likewise. | |
468 | (bfd_i386_nacl_arch): Likewise. | |
469 | (bfd_x64_32_arch_intel_syntax): Updated. | |
470 | * elf32-i386.c: Don't include "elf-nacl.h". | |
471 | (elf_i386_nacl_plt): Removed. | |
472 | (elf_i386_nacl_plt0_entry): Likewise. | |
473 | (elf_i386_nacl_plt_entry): Likewise. | |
474 | (elf_i386_nacl_pic_plt0_entry): Likewise. | |
475 | (elf_i386_nacl_pic_plt_entry): Likewise. | |
476 | (elf_i386_nacl_eh_frame_plt): Likewise. | |
477 | (elf_i386_nacl_plt): Likewise. | |
478 | (elf32_i386_nacl_elf_object_p): Likewise. | |
479 | (elf_i386_get_synthetic_symtab): Updated. | |
480 | (elf_i386_link_setup_gnu_properties): Likewise. | |
481 | * elf64-x86-64.c: Don't include "elf-nacl.h". | |
482 | (elf_x86_64_nacl_plt): Removed. | |
483 | (elf64_x86_64_nacl_elf_object_p): Likewise. | |
484 | (elf_x86_64_nacl_plt0_entry): Likewise. | |
485 | (elf_x86_64_nacl_plt_entry): Likewise. | |
486 | (elf_x86_64_nacl_eh_frame_plt): Likewise. | |
487 | (elf_x86_64_nacl_plt): Likewise. | |
488 | (elf32_x86_64_nacl_elf_object_p): Likewise. | |
489 | (elf_x86_64_get_synthetic_symtab): Updated. | |
490 | (elf_x86_64_link_setup_gnu_properties): Likewise. | |
491 | * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise. | |
492 | * targets.c: Remove x86 NaCl target vectors. | |
493 | * bfd-in2.h: Regenerated. | |
494 | * configure: Likewise. | |
495 | ||
a57f74bb L |
496 | 2020-06-29 H.J. Lu <hongjiu.lu@intel.com> |
497 | ||
498 | * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call | |
499 | _bfd_elf_add_dynamic_tags. | |
500 | ||
07d22f64 AM |
501 | 2020-06-29 Alan Modra <amodra@gmail.com> |
502 | ||
503 | * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check | |
504 | return value of bfd_bread. Don't read more than requested length. | |
505 | Sanity check length. Properly terminate file name. | |
506 | ||
279edac5 AM |
507 | 2020-06-29 Alan Modra <amodra@gmail.com> |
508 | ||
509 | * arc-got.h: Use C style comments. | |
510 | * coff-z80.c: Likewise. | |
511 | * elf32-csky.c: Likewise. | |
512 | * peXXigen.c: Likewise. | |
513 | * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out | |
514 | code. | |
515 | ||
85f7484a PB |
516 | 2020-06-26 Pat Bernardi <bernardi@adacore.com> |
517 | ||
518 | * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function. | |
519 | (elf32_m68k_merge_private_bfd_data): Merge GNU attributes. | |
520 | ||
ba9b3ef5 AM |
521 | 2020-06-26 Alan Modra <amodra@gmail.com> |
522 | ||
523 | * elfxx-riscv.c (struct priv_spec_t, priv_specs), | |
524 | (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers), | |
525 | (riscv_get_priv_spec_name): Move to.. | |
526 | * cpu-riscv.c: ..here. | |
527 | (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer. | |
528 | Use %u to print unsigned numbers. | |
529 | ||
069057bf AB |
530 | 2020-06-24 Andrew Burgess <andrew.burgess@embecosm.com> |
531 | ||
532 | * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the | |
533 | default architecture. | |
534 | ||
2c8e3708 L |
535 | 2020-06-24 H.J. Lu <hongjiu.lu@intel.com> |
536 | ||
537 | PR ld/26083 | |
538 | * elf32-csky.c (csky_elf_size_dynamic_sections): Call | |
539 | _bfd_elf_add_dynamic_tags. | |
540 | ||
c679ec98 L |
541 | 2020-06-24 H.J. Lu <hongjiu.lu@intel.com> |
542 | ||
543 | PR ld/26083 | |
544 | * elf32-cris.c (elf_cris_size_dynamic_sections): Call | |
545 | _bfd_elf_add_dynamic_tags. | |
546 | ||
f8b1e5f6 AM |
547 | 2020-06-24 Alan Modra <amodra@gmail.com> |
548 | ||
549 | * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement | |
550 | shifts without undefined behaviour. | |
551 | ||
3084d7a2 L |
552 | 2020-06-23 H.J. Lu <hongjiu.lu@intel.com> |
553 | ||
554 | * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and | |
555 | dt_jmprel_required. | |
556 | (_bfd_elf_add_dynamic_tags): New. | |
557 | * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call | |
558 | _bfd_elf_add_dynamic_tags. | |
559 | * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise. | |
560 | * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise. | |
561 | * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. | |
562 | * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise. | |
563 | * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. | |
564 | * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. | |
565 | * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. | |
566 | * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): | |
567 | Likewise. | |
568 | * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise. | |
569 | * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. | |
570 | * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. | |
571 | * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. | |
572 | * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise. | |
573 | * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. | |
574 | * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. | |
575 | * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. | |
576 | * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): | |
577 | Likewise. | |
578 | * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise. | |
579 | * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise. | |
580 | * elf32-arm.c (elf32_arm_size_dynamic_sections): Call | |
581 | _bfd_elf_maybe_vxworks_add_dynamic_tags. | |
582 | * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. | |
583 | * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): | |
584 | Likewise. | |
585 | * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. | |
586 | (_bfd_x86_elf_size_dynamic_sections): Likewise. | |
587 | * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc, | |
588 | dt_reloc_sz and dt_reloc_ent. | |
589 | * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New. | |
590 | * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags): | |
591 | Likewise. | |
592 | * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set | |
593 | etab.dt_pltgot_required. | |
594 | (elf32_hppa_size_dynamic_sections): Call | |
595 | _bfd_elf_add_dynamic_tags. | |
596 | * elf32-metag.c (elf_metag_link_hash_table_create): Set | |
597 | etab.dt_pltgot_required. | |
598 | (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags. | |
599 | * elf32-sh.c (sh_elf_link_hash_table_create): Set | |
600 | root.dt_pltgot_required for FDPIC output. | |
601 | (sh_elf_size_dynamic_sections): Call | |
602 | _bfd_elf_maybe_vxworks_add_dynamic_tags. | |
603 | * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set | |
604 | elf.dt_pltgot_required. | |
605 | (elf_xtensa_size_dynamic_sections): Call | |
606 | _bfd_elf_add_dynamic_tags. | |
607 | * elf64-hppa.c (elf64_hppa_hash_table_create): Set | |
608 | root.dt_pltgot_required. | |
609 | (elf64_hppa_size_dynamic_sections): Call | |
610 | _bfd_elf_add_dynamic_tags. | |
611 | * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set | |
612 | root.dt_pltgot_required. | |
613 | (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required | |
614 | for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags. | |
615 | * elflink.c (_bfd_elf_add_dynamic_tags): New. | |
616 | ||
d768f160 SJ |
617 | 2020-06-22 Saagar Jha <saagar@saagarjha.com> |
618 | ||
619 | * mach-o.c: Support the new load commands by reading a linkedit | |
620 | data command for them. | |
621 | ||
39ff0b81 NC |
622 | 2020-06-22 Nelson Chu <nelson.chu@sifive.com> |
623 | ||
624 | * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from | |
625 | opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker. | |
626 | (riscv_get_priv_spec_class): Likewise. | |
627 | (riscv_get_priv_spec_name): Likewise. | |
628 | (riscv_get_priv_spec_class_from_numbers): New function, convert | |
629 | the version numbers into string, then call riscv_get_priv_spec_class | |
630 | to get the priv spec class. | |
631 | * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration | |
632 | from include/opcode/riscv.h to bfd/elfxx-riscv.h. | |
633 | (riscv_get_priv_spec_name): Likewise. | |
634 | (riscv_get_priv_spec_class_from_numbers): New forward declaration. | |
635 | (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c. | |
636 | * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes | |
637 | of input and output objects form their priv spec attributes by | |
638 | riscv_get_priv_spec_class_from_numbers. Report warning rather than | |
639 | errors when linking objects with differnet priv spec versions. We do | |
640 | know v1.9.1 may have conflicts to other versions, so report the | |
641 | warning, too. After that, update the output priv spec version to the | |
642 | newest one so far. | |
643 | ||
cbd7581f NC |
644 | 2020-06-22 Nelson Chu <nelson.chu@sifive.com> |
645 | ||
646 | * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the | |
647 | priv attributes, we will check the conflicts for all of them (major, | |
648 | minor and revision), and then set the priv_attrs_merged to TRUE to | |
649 | indicate that we have handled all of the priv attributes. Remove | |
650 | the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero. | |
651 | ||
1e927850 AM |
652 | 2020-06-21 Alan Modra <amodra@gmail.com> |
653 | ||
654 | PR 26132 | |
655 | * configure.ac: Disable plugins by default for some targets. | |
656 | * plugin.c: Comment typo fix. | |
657 | * configure: Regenerate. | |
658 | ||
13aa5ceb NC |
659 | 2020-06-19 Nick Clifton <nickc@redhat.com> |
660 | ||
661 | * plugin.c (try_load_plugin): Suppress the error message about | |
662 | being unable to open a plugin if creating a list of viable | |
663 | plugins. | |
664 | ||
a435742a AM |
665 | 2020-06-16 Alan Modra <amodra@gmail.com> |
666 | ||
667 | * aout-tic30.c: Delete file. | |
668 | * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo. | |
669 | (BFD32_BACKENDS_CFILES): Remove aout-tic30.c. | |
670 | * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry. | |
671 | (xc16x-*-elf): Sort properly. | |
672 | * configure.ac: Remove tic30_aout_vec. | |
673 | * targets.c: Likewise. | |
674 | * Makefile.in: Regenerate. | |
675 | * configure: Regenerate. | |
676 | * po/SRC-POTFILES.in: Regenerate. | |
677 | ||
7a77f1ac MF |
678 | 2020-06-15 Max Filippov <jcmvbkbc@gmail.com> |
679 | ||
680 | * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED) | |
681 | (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros. | |
682 | (elf32xtensa_abi): New global variable. | |
683 | (xtensa_abi_choice): New function. | |
684 | (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of | |
685 | XSHAL_ABI to select PLT code. | |
686 | ||
cae64165 RM |
687 | 2020-06-15 Roland McGrath <mcgrathr@google.com> |
688 | ||
689 | * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility | |
690 | field of bfd_link_info. | |
691 | ||
40be168c AM |
692 | 2020-06-15 Alan Modra <amodra@gmail.com> |
693 | ||
694 | * config.bfd: Obsolete powerpcle-*-pe targets. | |
695 | ||
75cfe082 AM |
696 | 2020-06-15 Alan Modra <amodra@gmail.com> |
697 | ||
698 | PR 26103 | |
699 | * elflink.c (elf_link_add_archive_symbols): Exclude undefined | |
700 | symbols that were defined in discarded sections. | |
701 | * cofflink.c (coff_link_check_archive_element): Likewise. | |
702 | (coff_link_add_symbols): Set indx to -3 for symbols defined in | |
703 | discarded sections. | |
704 | (_bfd_coff_write_global_sym): Don't emit such symbols. | |
705 | libcoff-in.h (struct coff_link_hash_entry): Update indx comment. | |
706 | libcoff.h: Regenerate. | |
707 | ||
f0aa3025 AM |
708 | 2020-06-11 Alan Modra <amodra@gmail.com> |
709 | ||
710 | PR 26107 | |
711 | * pdp11.c (is_stab): Replace legacy "index" function with "strchr". | |
712 | ||
447f6d86 L |
713 | 2020-06-10 H.J. Lu <hongjiu.lu@intel.com> |
714 | ||
715 | * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext. | |
716 | (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext. | |
717 | (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead | |
718 | of reltext. | |
719 | ||
e1b5d517 L |
720 | 2020-06-10 H.J. Lu <hongjiu.lu@intel.com> |
721 | ||
722 | PR ld/26094 | |
723 | * elflink.c (bfd_elf_define_start_stop): Handle common symbols. | |
724 | Clear verinfo.verdef. | |
725 | ||
cebd6b8a L |
726 | 2020-06-09 H.J. Lu <hongjiu.lu@intel.com> |
727 | ||
728 | PR ld/18801 | |
729 | * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers. | |
730 | (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the | |
731 | bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC | |
732 | resolvers. | |
733 | * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. | |
734 | Set ifunc_resolvers if there are FUNC resolvers. | |
735 | * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver. | |
736 | (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver | |
737 | with elf.ifunc_resolvers. | |
738 | (write_plt_relocs_for_local_syms): Likewise. | |
739 | (ppc64_elf_relocate_section): Likewise. | |
740 | (ppc64_elf_finish_dynamic_sections): Likewise. | |
741 | * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): | |
742 | Updated. | |
743 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise. | |
744 | (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers | |
745 | instead of readonly_dynrelocs_against_ifunc. | |
746 | * elfxx-x86.h (elf_x86_link_hash_table): Remove | |
747 | readonly_dynrelocs_against_ifunc. | |
748 | ||
efb2a7b4 AM |
749 | 2020-06-09 Alan Modra <amodra@gmail.com> |
750 | ||
751 | * elf64-ppc.c (struct ppc_link_hash_table): Delete | |
752 | maybe_local_ifunc_resolver field. | |
753 | (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in | |
754 | cases where maybe_local_ifunc_resolver was set. | |
755 | (ppc64_elf_relocate_section): Likewise. | |
756 | (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel | |
757 | error to a warning. | |
758 | ||
9bcc30e4 L |
759 | 2020-06-08 H.J. Lu <hongjiu.lu@intel.com> |
760 | ||
761 | * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and | |
762 | tlsdesc_got. | |
763 | * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt | |
764 | and dt_tlsdesc_got. | |
765 | (elf32_arm_size_dynamic_sections): Updated. Clear | |
766 | root.tlsdesc_plt for DF_BIND_NOW. | |
767 | (elf32_arm_finish_dynamic_sections): Updated. | |
768 | (elf32_arm_output_arch_local_syms): Likewise. | |
769 | * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated. | |
770 | Clear root.tlsdesc_plt for DF_BIND_NOW. | |
771 | (nds32_elf_finish_dynamic_sections): Updated. | |
772 | * elf32-nds32.h (elf_nds32_link_hash_table): Remove | |
773 | dt_tlsdesc_plt and dt_tlsdesc_got. | |
774 | * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated. | |
775 | * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove | |
776 | tlsdesc_plt and dt_tlsdesc_got. | |
777 | (elfNN_aarch64_allocate_dynrelocs): Updated. | |
778 | (elfNN_aarch64_finish_dynamic_sections): Likewise. | |
779 | (elfNN_aarch64_size_dynamic_sections): Updated. Clear | |
780 | root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW | |
781 | twice. | |
782 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated. | |
783 | (_bfd_x86_elf_size_dynamic_sections): Likewise. | |
784 | (_bfd_x86_elf_finish_dynamic_sections): Likewise. | |
785 | * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and | |
786 | tlsdesc_got. | |
787 | ||
845b83d7 L |
788 | 2020-06-07 H.J. Lu <hongjiu.lu@intel.com> |
789 | ||
790 | * elf32-tic6x.c (elf32_bed): Defined the default to | |
791 | elf32_tic6x_bed. | |
792 | ||
9b8a8575 L |
793 | 2020-06-07 H.J. Lu <hongjiu.lu@intel.com> |
794 | ||
795 | * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and | |
796 | plt_rel_sec. | |
797 | (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with | |
798 | root.splt/root.srelplt. | |
799 | (elf64_hppa_create_dynamic_sections): Likewise. | |
800 | (elf64_hppa_size_dynamic_sections): Likewise. | |
801 | (elf64_hppa_finish_dynamic_symbol): Likewise. | |
802 | (elf_hppa_final_link): Likewise. | |
803 | (elf_hppa_final_link_relocate): Likewise. | |
804 | ||
bcab203d L |
805 | 2020-06-06 H.J. Lu <hongjiu.lu@intel.com> |
806 | ||
807 | * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated. | |
808 | * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove | |
809 | is_vxworks. | |
810 | ||
90c14f0c L |
811 | 2020-06-06 H.J. Lu <hongjiu.lu@intel.com> |
812 | ||
813 | * elf-bfd.h (elf_target_os): New. | |
814 | (elf_link_hash_table): Add target_os. | |
815 | (elf_backend_data): Add target_os. | |
816 | * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p, | |
817 | symbian_p and nacl_p. | |
818 | (create_got_section): Updated. | |
819 | (elf32_arm_create_dynamic_sections): Likewise. | |
820 | (arm_type_of_stub): Likewise. | |
821 | (elf32_arm_create_or_find_stub_sec): Likewise. | |
822 | (elf32_arm_allocate_plt_entry): Likewise. | |
823 | (elf32_arm_populate_plt_entry): Likewise. | |
824 | (elf32_arm_final_link_relocate): Likewise. | |
825 | (elf32_arm_check_relocs): Likewise. | |
826 | (allocate_dynrelocs_for_symbol): Likewise. | |
827 | (elf32_arm_finish_dynamic_symbol): Likewise. | |
828 | (elf32_arm_finish_dynamic_sections): Likewise. | |
829 | (elf32_arm_output_plt_map_1): Likewise. | |
830 | (elf32_arm_output_arch_local_syms): Likewise. | |
831 | (elf32_arm_add_symbol_hook): Likewise. | |
832 | (elf32_arm_nacl_link_hash_table_create): Likewise. | |
833 | (elf32_arm_vxworks_link_hash_table_create): Likewise. | |
834 | (elf32_arm_symbian_link_hash_table_create): Likewise. | |
835 | (ELF_TARGET_OS): New. | |
836 | * elf32-i386.c (elf_i386_arch_bed): Removed. | |
837 | (elf_backend_arch_data): Likewise. | |
838 | (elf_i386_solaris_arch_bed): Likewise. | |
839 | (elf_i386_nacl_arch_bed): Likewise. | |
840 | (elf_i386_vxworks_arch_bed): Likewise. | |
841 | (elf_i386_relocate_section): Updated. | |
842 | (elf_i386_finish_dynamic_sections): Likewise. | |
843 | (elf_i386_get_synthetic_symtab): Likewise. | |
844 | (elf_i386_link_setup_gnu_properties): Likewise. | |
845 | (ELF_TARGET_OS): New. | |
846 | * elf32-mips.c (ELF_TARGET_OS): New. | |
847 | * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks. | |
848 | (ppc_elf_create_got): Updated. | |
849 | (ppc_elf_create_dynamic_sections): Likewise. | |
850 | (ppc_elf_check_relocs): Likewise. | |
851 | (ppc_elf_adjust_dynamic_symbol): Likewise. | |
852 | (ppc_elf_size_dynamic_sections): Likewise. | |
853 | (ppc_elf_relocate_section): Likewise. | |
854 | (ppc_elf_finish_dynamic_sections): Likewise. | |
855 | (ppc_elf_vxworks_link_hash_table_create): Likewise. | |
856 | (ELF_TARGET_OS): New. | |
857 | * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p. | |
858 | (sh_elf_link_hash_table_create): Updated. | |
859 | (sh_elf_create_dynamic_sections): Likewise. | |
860 | (allocate_dynrelocs): Likewise. | |
861 | (sh_elf_size_dynamic_sections): Likewise. | |
862 | (sh_elf_relocate_section): Likewise. | |
863 | (sh_elf_finish_dynamic_symbol): Likewise. | |
864 | (sh_elf_finish_dynamic_sections): Likewise. | |
865 | (ELF_TARGET_OS): New. | |
866 | * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create): | |
867 | Removed. | |
868 | (bfd_elf32_bfd_link_hash_table_create): Likewise. | |
869 | (ELF_TARGET_OS): New. | |
870 | * elf64-x86-64.c (elf_x86_64_arch_bed): Removed. | |
871 | (elf_x86_64_solaris_arch_bed): Likewise. | |
872 | (elf_x86_64_nacl_arch_bed): Likewise. | |
873 | (elf_x86_64_finish_dynamic_sections): Updated. | |
874 | (elf_x86_64_get_synthetic_symtab): Likewise. | |
875 | (elf_x86_64_link_setup_gnu_properties): Likewise. | |
876 | (ELF_TARGET_OS): New. | |
877 | * elflink.c (_bfd_elf_link_hash_table_init): Initialize | |
878 | target_o. | |
879 | * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks. | |
880 | (MIPS_ELF_REL_DYN_NAME): Updated. | |
881 | (ELF_MIPS_GP_OFFSET): Likewise. | |
882 | (mips_elf_create_local_got_entry): Likewise. | |
883 | (mips_elf_allocate_dynamic_relocations): Likewise. | |
884 | (mips_elf_count_got_symbols): Likewise. | |
885 | (is_gott_symbol): Likewise. | |
886 | (mips_elf_calculate_relocation): Likewise. | |
887 | (mips_elf_create_dynamic_relocation): Likewise. | |
888 | (_bfd_mips_elf_check_relocs): Likewise. | |
889 | (allocate_dynrelocs): Likewise. | |
890 | (_bfd_mips_elf_adjust_dynamic_symbol): Likewise. | |
891 | (mips_elf_lay_out_got): Likewise. | |
892 | (mips_elf_set_plt_sym_value): Likewise. | |
893 | (_bfd_mips_elf_size_dynamic_sections): Likewise. | |
894 | (_bfd_mips_elf_finish_dynamic_symbol): Likewise. | |
895 | (_bfd_mips_elf_finish_dynamic_sections): Likewise. | |
896 | (_bfd_mips_elf_final_link): Likewise. | |
897 | (_bfd_mips_init_file_header): Likewise. | |
898 | * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections): | |
899 | Likewise. | |
900 | (allocate_dynrelocs): Likewise. | |
901 | (_bfd_sparc_elf_size_dynamic_sections): Likewise. | |
902 | (_bfd_sparc_elf_relocate_section): Likewise. | |
903 | (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. | |
904 | (sparc_finish_dyn): Likewise. | |
905 | (_bfd_sparc_elf_finish_dynamic_sections): Likewise. | |
906 | * elfxx-target.h (ELF_TARGET_OS): New. | |
907 | (elfNN_bed): Add ELF_TARGET_OS. | |
908 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated. | |
909 | (_bfd_x86_elf_link_hash_table_create): Likewise. | |
910 | (_bfd_x86_elf_size_dynamic_sections): Likewise. | |
911 | (_bfd_x86_elf_finish_dynamic_sections): Likewise. | |
912 | (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. | |
913 | (_bfd_x86_elf_link_setup_gnu_properties): Likewise. | |
914 | * elfxx-x86.h (elf_x86_target_os): Removed. | |
915 | (elf_x86_backend_data): Likewise. | |
916 | (get_elf_x86_backend_data): Likewise. | |
917 | (elf_x86_link_hash_table): Remove target_os. | |
918 | ||
87c69f97 AM |
919 | 2020-06-06 Alan Modra <amodra@gmail.com> |
920 | ||
921 | * reloc.c: Rename | |
922 | BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34, | |
923 | BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34, | |
924 | BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34, | |
925 | BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34. | |
926 | * elf64-ppc.c: Update throughout for reloc renaming. | |
927 | (ppc64_elf_reloc_name_lookup): Handle old reloc names. | |
928 | * libbfd.h: Regenerate. | |
929 | * bfd-in2.h: Regenerate. | |
930 | ||
981f1518 L |
931 | 2020-06-05 H.J. Lu <hongjiu.lu@intel.com> |
932 | ||
8a4ba3a1 | 933 | PR ld/26080 |
981f1518 L |
934 | * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC |
935 | section. | |
936 | ||
9c65eeac NC |
937 | 2020-06-05 Nick Clifton <nickc@redhat.com> |
938 | ||
939 | * pdp11.c (aout_link_add_symbols): Fix use before initialisation | |
940 | bug. | |
941 | ||
41285764 NC |
942 | 2020-06-05 Nelson Chu <nelson.chu@sifive.com> |
943 | ||
944 | * elfnn-riscv.c (riscv_merge_attributes): Add new boolean | |
945 | priv_may_conflict, in_priv_zero and out_priv_zero to decide | |
946 | whether the object can be linked according to it's priv | |
947 | attributes. The object without any priv spec attributes can | |
948 | be linked with others. If the first input object doesn't contain | |
949 | any priv attributes, then we need to copy the setting from the | |
950 | next input one. Also report more detailed error messages to user. | |
951 | ||
a975c88e SC |
952 | 2020-06-04 Stephen Casner <casner@acm.org> |
953 | ||
954 | Extend pdp11-aout symbol table format to accommodate .stab | |
955 | symbols and implement correct handling of them. | |
956 | ||
957 | * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc. | |
958 | (N_STAB, is_stab): Needed new function is_stab to disambiguate | |
959 | normal vs. .stab symbol table type values, replacing N_STAB mask. | |
960 | (translate_from_native_sym_flags): Determine correct section for | |
961 | different .stab types. | |
962 | (translate_to_native_sym_flags): Leave .stab types intact. | |
963 | (translate_symbol_table): Error if symbol indicates overlay; | |
964 | store desc field from .stab symbols. | |
965 | (write_syms): Output desc field with symbol. | |
966 | (aout_link_check_ar_symbols): Skip .stab symbols. | |
967 | (aout_link_add_symbols): Correctly distinguish .stab symbols. | |
968 | (aout_link_write_other_symbol): Write 0 for desk and ovly fields. | |
969 | (aout_link_write_symbols): Write 0 for desk and ovly fields; | |
970 | correctly distinguish .stab symbols and select calculate their | |
971 | section and value; and copy desc and ovly fields from input symbol | |
972 | to output symbol. | |
973 | ||
3b9313c4 SC |
974 | 2020-06-04 Stephen Casner <casner@acm.org> |
975 | ||
976 | * aoutx.h (translate_symbol_table): Comment had external and | |
977 | internal swapped. | |
978 | * pdp11.c (translate_symbol_table): Likewise. | |
979 | ||
add5f777 L |
980 | 2020-06-04 H.J. Lu <hongjiu.lu@intel.com> |
981 | ||
982 | * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id. | |
983 | (is_x86_elf): Check elf.hash_table_id instead of target_id. | |
984 | * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated. | |
985 | ||
c4b126b8 L |
986 | 2020-06-04 H.J. Lu <hongjiu.lu@intel.com> |
987 | ||
988 | PR ld/26080 | |
989 | * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation | |
990 | in debug section against symbol defined in shared library to 0. | |
991 | * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check. | |
992 | * elf32-lm32.c (lm32_elf_check_relocs): Likewise. | |
993 | * elf32-m32r.c (m32r_elf_check_relocs): Likewise. | |
994 | * elf32-nds32.c (nds32_elf_check_relocs): Likewise. | |
995 | * elf32-nios2.c (nios2_elf32_check_relocs): Likewise. | |
996 | * elf32-or1k.c (or1k_elf_check_relocs): Likewise. | |
997 | * elf32-ppc.c (ppc_elf_check_relocs): Likewise. | |
998 | * elf32-sh.c (sh_elf_check_relocs): Likewise. | |
999 | * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. | |
1000 | * elf64-alpha.c (elf64_alpha_check_relocs): Likewise. | |
1001 | * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. | |
1002 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. | |
1003 | * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. | |
1004 | * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT | |
1005 | reference. | |
1006 | (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if | |
1007 | there is non-GOT reference. | |
1008 | * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded, | |
1009 | non-alloced sections. | |
1010 | ||
31af1e68 SC |
1011 | 2020-06-03 Stephen Casner <casner@acm.org> |
1012 | ||
1013 | Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c. | |
1014 | ||
1015 | * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for | |
1016 | files with relocs. | |
1017 | (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero. | |
1018 | 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any | |
1019 | other size that doesn't qcover the header word. | |
1020 | bf82069dce1 PR 23056 - Allocate an extra byte at the end of the | |
1021 | string table, and zero it. | |
1022 | (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error | |
1023 | message and set bfd_error on finding an invalid name string offset. | |
1024 | (add_to_stringtab): INLINE -> inline | |
1025 | (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index | |
1026 | bound check. | |
1027 | (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report | |
1028 | any relocs that could not be recognised. | |
1029 | 92744f05809 PR 20929 - Check for relocs without an associated symbol. | |
1030 | (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol | |
1031 | name exists and is long enough, before attempting to see if it is | |
1032 | for a .o file. | |
1033 | c3864421222 - Correct case for N_SO being the last symbol. | |
1034 | 50455f1ab29 PR 20891 - Handle the case where the main file name | |
1035 | and the directory name are both empty. | |
1036 | e82ab856bb4 PR 20892 - Handle the case where function name is empty. | |
1037 | (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of | |
1038 | range string table offsets. | |
1039 | 531336e3a0b PR 20909 - Fix off-by-one error in check for an | |
cae64165 | 1040 | illegal string offset. |
31af1e68 SC |
1041 | (aout_link_includes_newfunc): Add comment. |
1042 | (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error | |
1043 | on unexpected relocation type rather than ASSERT. | |
1044 | ||
d4d8aee3 L |
1045 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1046 | ||
1047 | PR ld/26066 | |
1048 | * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call | |
1049 | _bfd_elf_maybe_set_textrel to set DF_TEXTREL. | |
1050 | ||
58ee44ef L |
1051 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1052 | ||
1053 | PR ld/26066 | |
1054 | * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded, | |
1055 | non-alloced sections. | |
1056 | ||
9a689602 L |
1057 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1058 | ||
1059 | * elf32-frv.c (elf32_frv_relocate_section): Don't generate | |
1060 | dynamic relocations for non SEC_ALLOC sections. | |
1061 | ||
0bff7528 GN |
1062 | 2020-06-03 Gunther Nikl <gnikl@justmail.de> |
1063 | ||
1064 | * aout64.c (BMAGIC, QMAGIC): Do not define. | |
1065 | * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines. | |
1066 | (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC | |
1067 | to check the file format. | |
1068 | (adjust_z_magic): Use N_SET_QMAGIC to set file format. | |
1069 | * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define. | |
1070 | * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define. | |
1071 | ||
50d03636 L |
1072 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1073 | ||
1074 | * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic | |
1075 | relocations for non SEC_ALLOC sections. | |
1076 | ||
d49e5065 L |
1077 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1078 | ||
1079 | * elf-bfd.h (_bfd_elf_maybe_set_textrel): New | |
1080 | * elf32-arm.c (maybe_set_textrel): Removed. | |
1081 | (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel | |
1082 | with _bfd_elf_maybe_set_textrel. | |
1083 | * elf32-csky.c (maybe_set_textrel): Removed. | |
1084 | (csky_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1085 | with _bfd_elf_maybe_set_textrel. | |
1086 | * elf32-hppa.c (maybe_set_textrel): Removed. | |
1087 | (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel | |
1088 | with _bfd_elf_maybe_set_textrel. | |
1089 | * elf32-lm32.c (maybe_set_textrel): Removed. | |
1090 | (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1091 | with _bfd_elf_maybe_set_textrel. | |
1092 | * elf32-m32r.c (maybe_set_textrel): Removed. | |
1093 | (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1094 | with _bfd_elf_maybe_set_textrel. | |
1095 | * elf32-metag.c (maybe_set_textrel): Removed. | |
1096 | (elf_metag_size_dynamic_sections): Replace maybe_set_textrel | |
1097 | with _bfd_elf_maybe_set_textrel. | |
1098 | * elf32-nds32.c (maybe_set_textrel): Removed. | |
1099 | (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1100 | with _bfd_elf_maybe_set_textrel. | |
1101 | * elf32-or1k.c (maybe_set_textrel): Removed. | |
1102 | (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1103 | with _bfd_elf_maybe_set_textrel. | |
1104 | * elf32-ppc.c (maybe_set_textrel): Removed. | |
1105 | (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1106 | with _bfd_elf_maybe_set_textrel. | |
1107 | * elf32-s390.c (maybe_set_textrel): Removed. | |
1108 | (elf_s390_size_dynamic_sections): Replace maybe_set_textrel | |
1109 | with _bfd_elf_maybe_set_textrel. | |
1110 | * elf32-sh.c (maybe_set_textrel): Removed. | |
1111 | (sh_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1112 | with _bfd_elf_maybe_set_textrel. | |
1113 | * elf32-tic6x.c (maybe_set_textrel): Removed. | |
1114 | (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel | |
1115 | with _bfd_elf_maybe_set_textrel. | |
1116 | * elf32-tilepro.c (maybe_set_textrel): Removed. | |
1117 | (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1118 | with _bfd_elf_maybe_set_textrel. | |
1119 | * elf64-ppc.c (maybe_set_textrel): Removed. | |
1120 | (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1121 | with _bfd_elf_maybe_set_textrel. | |
1122 | * elf64-s390.c (maybe_set_textrel): Removed. | |
1123 | (elf_s390_size_dynamic_sections): Replace maybe_set_textrel | |
1124 | with _bfd_elf_maybe_set_textrel. | |
1125 | * elfnn-aarch64.c (maybe_set_textrel): Removed. | |
1126 | (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel | |
1127 | with _bfd_elf_maybe_set_textrel. | |
1128 | * elfnn-riscv.c (maybe_set_textrel): Removed. | |
1129 | (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1130 | with _bfd_elf_maybe_set_textrel. | |
1131 | * elfxx-sparc.c (maybe_set_textrel): Removed. | |
1132 | (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1133 | with _bfd_elf_maybe_set_textrel. | |
1134 | * elfxx-tilegx.c (maybe_set_textrel): Removed. | |
1135 | (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1136 | with _bfd_elf_maybe_set_textrel. | |
1137 | * elfxx-x86.c (maybe_set_textrel): Removed. | |
1138 | (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel | |
1139 | with _bfd_elf_maybe_set_textrel. | |
1140 | * elflink.c (_bfd_elf_maybe_set_textrel): New. | |
1141 | ||
ad172eaa L |
1142 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1143 | ||
1144 | PR ld/26067 | |
1145 | * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy | |
1146 | dyn_relocs. | |
1147 | * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise. | |
1148 | * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. | |
1149 | * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise. | |
1150 | * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol): | |
1151 | Likewise. | |
1152 | * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise. | |
1153 | * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise. | |
1154 | * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise. | |
1155 | * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. | |
1156 | * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise. | |
1157 | * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise. | |
1158 | * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. | |
1159 | * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise. | |
1160 | * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise. | |
1161 | * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise. | |
1162 | * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise. | |
1163 | * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise. | |
1164 | * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed. | |
1165 | (elf_backend_copy_indirect_symbol): Likewise. | |
1166 | * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed. | |
1167 | (elf_backend_copy_indirect_symbol): Likewise. | |
1168 | * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs. | |
1169 | ||
5dbc8b37 L |
1170 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1171 | ||
1172 | PR ld/26067 | |
1173 | * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New. | |
1174 | * elf32-arm.c (readonly_dynrelocs): Removed. | |
1175 | (maybe_set_textrel): Replace readonly_dynrelocs with | |
1176 | _bfd_elf_readonly_dynrelocs. | |
1177 | * elf32-csky.c (readonly_dynrelocs): Removed. | |
1178 | (maybe_set_textrel): Replace readonly_dynrelocs with | |
1179 | _bfd_elf_readonly_dynrelocs. | |
1180 | * elf32-hppa.c(readonly_dynrelocs): Removed. | |
1181 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with | |
1182 | _bfd_elf_readonly_dynrelocs. | |
1183 | (maybe_set_textrel): Likewise. | |
1184 | * elf32-lm32.c (readonly_dynrelocs): Removed. | |
1185 | (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1186 | with _bfd_elf_readonly_dynrelocs. | |
1187 | (maybe_set_textrel): Likewise. | |
1188 | * elf32-m32r.c (readonly_dynrelocs): Removed. | |
1189 | (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1190 | with _bfd_elf_readonly_dynrelocs. | |
1191 | (maybe_set_textrel): Likewise. | |
1192 | * elf32-metag.c (readonly_dynrelocs): Removed. | |
1193 | (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1194 | with _bfd_elf_readonly_dynrelocs. | |
1195 | (maybe_set_textrel): Likewise. | |
1196 | * elf32-microblaze.c (readonly_dynrelocs): Removed. | |
1197 | (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1198 | with _bfd_elf_readonly_dynrelocs. | |
1199 | * elf32-nds32.c (readonly_dynrelocs): Removed. | |
1200 | (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1201 | with _bfd_elf_readonly_dynrelocs. | |
1202 | (maybe_set_textrel): Likewise. | |
1203 | * elf32-or1k.c (readonly_dynrelocs): Removed. | |
1204 | (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1205 | with _bfd_elf_readonly_dynrelocs. | |
1206 | * elf32-ppc.c (readonly_dynrelocs): Removed. | |
1207 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with | |
1208 | _bfd_elf_readonly_dynrelocs. | |
1209 | (ppc_elf_adjust_dynamic_symbol): Likewise. | |
1210 | (maybe_set_textrel): Likewise. | |
1211 | * elf32-s390.c (readonly_dynrelocs): Removed. | |
1212 | (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1213 | with _bfd_elf_readonly_dynrelocs. | |
1214 | (maybe_set_textrel): Likewise. | |
1215 | * elf32-sh.c (readonly_dynrelocs): Removed. | |
1216 | (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with | |
1217 | _bfd_elf_readonly_dynrelocs. | |
1218 | (maybe_set_textrel): Likewise. | |
1219 | * elf32-tic6x.c (readonly_dynrelocs): Removed. | |
1220 | (maybe_set_textrel): Replace readonly_dynrelocs with | |
1221 | _bfd_elf_readonly_dynrelocs. | |
1222 | * elf32-tilepro.c (readonly_dynrelocs): Removed. | |
1223 | (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1224 | with _bfd_elf_readonly_dynrelocs. | |
1225 | (maybe_set_textrel): Likewise. | |
1226 | * elf64-ppc.c (readonly_dynrelocs): Removed. | |
1227 | (alias_readonly_dynrelocs): Replace readonly_dynrelocs with | |
1228 | _bfd_elf_readonly_dynrelocs. | |
1229 | (ppc64_elf_adjust_dynamic_symbol): Likewise. | |
1230 | (maybe_set_textrel): Likewise. | |
1231 | * elf64-s390.c (readonly_dynrelocs): Removed. | |
1232 | (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1233 | with _bfd_elf_readonly_dynrelocs. | |
1234 | (maybe_set_textrel): Likewise. | |
1235 | * elflink.c (_bfd_elf_readonly_dynrelocs): New. | |
1236 | * elfnn-aarch64.c (readonly_dynrelocs): Removed. | |
1237 | (maybe_set_textrel): Replace readonly_dynrelocs with | |
1238 | _bfd_elf_readonly_dynrelocs. | |
1239 | * elfnn-riscv.c (readonly_dynrelocs): Removed. | |
1240 | (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1241 | with _bfd_elf_readonly_dynrelocs. | |
1242 | (maybe_set_textrel): Likewise. | |
1243 | * elfxx-sparc.c (readonly_dynrelocs): Removed. | |
1244 | (_bfd_sparc_elf_adjust_dynamic_symbol): Replace | |
1245 | readonly_dynrelocs with _bfd_elf_readonly_dynrelocs. | |
1246 | (maybe_set_textrel): Likewise. | |
1247 | * elfxx-tilegx.c (readonly_dynrelocs): Removed. | |
1248 | (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs | |
1249 | with _bfd_elf_readonly_dynrelocs. | |
1250 | (maybe_set_textrel): Likewise. | |
1251 | * elfxx-x86.c (readonly_dynrelocs): Removed. | |
1252 | (maybe_set_textrel): Replace readonly_dynrelocs with | |
1253 | _bfd_elf_readonly_dynrelocs. | |
1254 | (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. | |
1255 | ||
433953ff L |
1256 | 2020-06-03 H.J. Lu <hongjiu.lu@intel.com> |
1257 | ||
1258 | * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence | |
1259 | -fsanitize=undefined. | |
1260 | ||
67580036 AM |
1261 | 2020-06-03 Alan Modra <amodra@gmail.com> |
1262 | ||
1263 | PR 26069 | |
1264 | PR 18758 | |
1265 | * peicode.h (pe_ILF_make_a_section): Align data for compilers | |
1266 | other than gcc. | |
1267 | (pe_ILF_build_a_bfd): Likewise. | |
1268 | ||
0ed18fa1 AM |
1269 | 2020-06-03 Alan Modra <amodra@gmail.com> |
1270 | ||
7eea15c5 | 1271 | PR 26069 |
0ed18fa1 AM |
1272 | * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for |
1273 | core files as well as objects. | |
1274 | ||
190eb1dd L |
1275 | 2020-06-01 H.J. Lu <hongjiu.lu@intel.com> |
1276 | ||
1277 | PR ld/26067 | |
1278 | * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size. | |
1279 | * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): | |
1280 | Updated. | |
1281 | * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs. | |
1282 | (elf_arc_link_hash_newfunc): Updated. | |
1283 | * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs. | |
1284 | (elf32_arm_link_hash_newfunc): Updated. | |
1285 | (elf32_arm_copy_indirect_symbol): Likewise. | |
1286 | (elf32_arm_check_relocs): Likewise. | |
1287 | (readonly_dynrelocs): Likewise. | |
1288 | (allocate_dynrelocs_for_symbol): Likewise. | |
1289 | * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs. | |
1290 | (csky_elf_link_hash_newfunc): Updated. | |
1291 | (csky_allocate_dynrelocs): Likewise. | |
1292 | (readonly_dynrelocs): Likewise. | |
1293 | (csky_elf_copy_indirect_symbol): Likewise. | |
1294 | * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs. | |
1295 | (hppa_link_hash_newfunc): Updated. | |
1296 | (elf32_hppa_copy_indirect_symbol): Likewise. | |
1297 | (elf32_hppa_hide_symbol): Likewise. | |
1298 | (elf32_hppa_adjust_dynamic_symbol): Likewise. | |
1299 | (allocate_dynrelocs): Likewise. | |
1300 | (elf32_hppa_relocate_section): Likewise. | |
1301 | * elf32-i386.c (elf_i386_check_relocs): Likewise. | |
1302 | * elf32-lm32.c (elf_lm32_link_hash_entry): Removed. | |
1303 | (lm32_elf_link_hash_newfunc): Likewise. | |
1304 | (lm32_elf_link_hash_table_create): Updated. | |
1305 | (readonly_dynrelocs): Likewise. | |
1306 | (allocate_dynrelocs): Likewise. | |
1307 | (lm32_elf_copy_indirect_symbol): Likewise. | |
1308 | * elf32-m32r.c (elf_m32r_link_hash_entry): Removed. | |
1309 | (m32r_elf_link_hash_newfunc): Likewise. | |
1310 | (m32r_elf_link_hash_table_create): Updated. | |
1311 | (m32r_elf_copy_indirect_symbol): Likewise. | |
1312 | (allocate_dynrelocs): Likewise. | |
1313 | * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs. | |
1314 | (metag_link_hash_newfunc): Updated. | |
1315 | (elf_metag_copy_indirect_symbol): Likewise. | |
1316 | (readonly_dynrelocs): Likewise. | |
1317 | (allocate_dynrelocs): Likewise. | |
1318 | * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove | |
1319 | dyn_relocs. | |
1320 | (link_hash_newfunc): Updated. | |
1321 | (microblaze_elf_check_relocs): Likewise. | |
1322 | (microblaze_elf_copy_indirect_symbol): Likewise. | |
1323 | (readonly_dynrelocs): Likewise. | |
1324 | (allocate_dynrelocs): Likewise. | |
1325 | * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs. | |
1326 | (nds32_elf_link_hash_newfunc): Updated. | |
1327 | (nds32_elf_copy_indirect_symbol): Likewise. | |
1328 | (readonly_dynrelocs): Likewise. | |
1329 | (allocate_dynrelocs): Likewise. | |
1330 | (nds32_elf_check_relocs): Likewise. | |
1331 | * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs. | |
1332 | (link_hash_newfunc): Updated. | |
1333 | (nios2_elf32_copy_indirect_symbol): Likewise. | |
1334 | (nios2_elf32_check_relocs): Likewise. | |
1335 | (allocate_dynrelocs): Likewise. | |
1336 | * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs. | |
1337 | (or1k_elf_link_hash_newfunc): Updated. | |
1338 | (readonly_dynrelocs): Likewise. | |
1339 | (allocate_dynrelocs): Likewise. | |
1340 | (or1k_elf_copy_indirect_symbol): Likewise. | |
1341 | * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs. | |
1342 | (ppc_elf_link_hash_newfunc): Updated. | |
1343 | (ppc_elf_copy_indirect_symbol): Likewise. | |
1344 | (ppc_elf_check_relocs): Likewise. | |
1345 | (readonly_dynrelocs): Likewise. | |
1346 | (ppc_elf_adjust_dynamic_symbol): Likewise. | |
1347 | (allocate_dynrelocs): Likewise. | |
1348 | (ppc_elf_relocate_section): Likewise. | |
1349 | * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs. | |
1350 | (link_hash_newfunc): Updated. | |
1351 | (elf_s390_copy_indirect_symbol): Likewise. | |
1352 | (readonly_dynrelocs): Likewise. | |
1353 | (elf_s390_adjust_dynamic_symbol): Likewise. | |
1354 | (allocate_dynrelocs): Likewise. | |
1355 | * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs. | |
1356 | (sh_elf_link_hash_newfunc): Updated. | |
1357 | (readonly_dynrelocs): Likewise. | |
1358 | (allocate_dynrelocs): Likewise. | |
1359 | (sh_elf_copy_indirect_symbol): Likewise. | |
1360 | (sh_elf_check_relocs): Likewise. | |
1361 | * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed. | |
1362 | (elf32_tic6x_link_hash_newfunc): Likewise. | |
1363 | (elf32_tic6x_link_hash_table_create): Updated. | |
1364 | (readonly_dynrelocs): Likewise. | |
1365 | (elf32_tic6x_check_relocs): Likewise. | |
1366 | (elf32_tic6x_allocate_dynrelocs): Likewise. | |
1367 | * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove | |
1368 | dyn_relocs. | |
1369 | (link_hash_newfunc): Updated. | |
1370 | (tilepro_elf_copy_indirect_symbol): Likewise. | |
1371 | (tilepro_elf_check_relocs): Likewise. | |
1372 | (allocate_dynrelocs): Likewise. | |
1373 | * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs. | |
1374 | (ppc64_elf_copy_indirect_symbol): Updated. | |
1375 | (ppc64_elf_check_relocs): Likewise. | |
1376 | (readonly_dynrelocs): Likewise. | |
1377 | (ppc64_elf_adjust_dynamic_symbol): Likewise. | |
1378 | (dec_dynrel_count): Likewise. | |
1379 | (allocate_dynrelocs): Likewise. | |
1380 | (ppc64_elf_relocate_section): Likewise. | |
1381 | * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs. | |
1382 | (link_hash_newfunc): Updated. | |
1383 | (elf_s390_copy_indirect_symbol): Likewise. | |
1384 | (readonly_dynrelocs): Likewise. | |
1385 | (allocate_dynrelocs): Likewise. | |
1386 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. | |
1387 | * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove | |
1388 | dyn_relocs. | |
1389 | (elfNN_aarch64_link_hash_newfunc): Updated. | |
1390 | (elfNN_aarch64_copy_indirect_symbol): Likewise. | |
1391 | (readonly_dynrelocs): Likewise. | |
1392 | (need_copy_relocation_p): Likewise. | |
1393 | (elfNN_aarch64_allocate_dynrelocs): Likewise. | |
1394 | (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise. | |
1395 | * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs. | |
1396 | (link_hash_newfunc): Updated. | |
1397 | (riscv_elf_copy_indirect_symbol): Likewise. | |
1398 | (riscv_elf_check_relocs): Likewise. | |
1399 | (readonly_dynrelocs): Likewise. | |
1400 | (allocate_dynrelocs): Likewise. | |
1401 | * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove | |
1402 | dyn_relocs. | |
1403 | (link_hash_newfunc): Updated. | |
1404 | (_bfd_sparc_elf_copy_indirect_symbol): Likewise. | |
1405 | (_bfd_sparc_elf_check_relocs): Likewise. | |
1406 | (readonly_dynrelocs): Likewise. | |
1407 | (allocate_dynrelocs): Likewise. | |
1408 | * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs. | |
1409 | (link_hash_newfunc): Updated. | |
1410 | (tilegx_elf_copy_indirect_symbol): Likewise. | |
1411 | (tilegx_elf_check_relocs): Likewise. | |
1412 | (readonly_dynrelocs): Likewise. | |
1413 | (allocate_dynrelocs): Likewise. | |
1414 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise. | |
1415 | (readonly_dynrelocs): Likewise. | |
1416 | (_bfd_x86_elf_copy_indirect_symbol): Likewise. | |
1417 | * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs. | |
1418 | ||
2fdb65f2 AM |
1419 | 2020-06-01 Alan Modra <amodra@gmail.com> |
1420 | ||
1421 | * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current | |
1422 | command against cmd_length, not the end of record. For | |
1423 | ETIR__C_STO_IMMR check size against cmd_length, mask repeat count | |
1424 | to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB | |
1425 | cmd_length test. | |
1426 | ||
12adf805 DF |
1427 | 2020-05-28 David Faust <david.faust@oracle.com> |
1428 | ||
1429 | * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of | |
1430 | R_BPF_INSN_{32,64} relocations. | |
1431 | ||
66e3eb08 SC |
1432 | 2020-05-28 Stephen Casner <casner@acm.org> |
1433 | ||
1434 | * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of | |
1435 | addreses in .long (used in testsuites) and .stab values. | |
1436 | ||
a6dbf402 L |
1437 | 2020-05-27 H.J. Lu <hongjiu.lu@intel.com> |
1438 | ||
1439 | PR ld/22909 | |
1440 | * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check. | |
1441 | Check bfd_link_dll when issue a DT_TEXTREL warning. | |
1442 | * elfxx-x86.c (maybe_set_textrel): Likewise. | |
1443 | (_bfd_x86_elf_size_dynamic_sections): Likewise. | |
1444 | ||
9e7cb4c3 NC |
1445 | 2020-05-26 Nick Clifton <nickc@redhat.com> |
1446 | ||
1447 | * plugin.c (try_load_plugin): Extend error message when a plugin | |
1448 | fails to open. | |
1449 | ||
c892b447 AM |
1450 | 2020-05-23 Alan Modra <amodra@gmail.com> |
1451 | ||
1452 | * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header. | |
1453 | ||
6f3fe02b AM |
1454 | 2020-05-22 Alan Modra <amodra@gmail.com> |
1455 | ||
1456 | PR 25882 | |
1457 | * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP | |
1458 | attributes from shared libraries, and do not return an error if | |
1459 | they don't match. | |
1460 | ||
0490dd41 AM |
1461 | 2020-05-21 Alan Modra <amodra@gmail.com> |
1462 | ||
1463 | PR 25993 | |
1464 | * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd | |
1465 | filename. | |
1466 | (_bfd_delete_bfd): Free the copy. | |
1467 | (_bfd_new_bfd): Free nbfd->memory on error. | |
1468 | ||
c9594989 AM |
1469 | 2020-05-21 Alan Modra <amodra@gmail.com> |
1470 | ||
1471 | * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout. | |
1472 | * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c, | |
1473 | * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c, | |
1474 | * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c, | |
1475 | * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, | |
1476 | * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c, | |
1477 | * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c, | |
1478 | * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c, | |
1479 | * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c, | |
1480 | * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, | |
1481 | * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c, | |
1482 | * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c, | |
1483 | * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, | |
1484 | * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c | |
1485 | * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h, | |
1486 | * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, | |
1487 | * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c, | |
1488 | * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c, | |
1489 | * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c, | |
1490 | * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise. | |
1491 | ||
8f595e9b NC |
1492 | 2020-05-20 Nelson Chu <nelson.chu@sifive.com> |
1493 | ||
1494 | * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function | |
1495 | get_default_version. It is used to find the default version for | |
1496 | the specific extension. | |
1497 | * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters | |
1498 | default_major_version and default_minor_version. Add new bfd_boolean | |
1499 | parameter *use_default_version. Set it to TRUE if we need to call | |
1500 | the callback rps->get_default_version to find the default version. | |
1501 | (riscv_parse_std_ext): Call rps->get_default_version if we fail to find | |
1502 | the default version in riscv_parsing_subset_version, and then call | |
1503 | riscv_add_subset to add the subset into subset list. | |
1504 | (riscv_parse_prefixed_ext): Likewise. | |
1505 | (riscv_std_z_ext_strtab): Support Zicsr extensions. | |
1506 | * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the | |
1507 | strings rather than characters. | |
1508 | riscv_merge_arch_attr_info): The callback function get_default_version | |
1509 | is only needed for assembler, so set it to NULL int the linker. | |
1510 | * elfxx-riscv.c (riscv_estimate_digit): Remove the static. | |
1511 | * elfxx-riscv.h: Updated. | |
1512 | ||
7b958a48 AM |
1513 | 2020-05-20 Alan Modra <amodra@gmail.com> |
1514 | ||
1515 | PR 25993 | |
1516 | * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename, | |
1517 | use bfd_set_filename. | |
1518 | * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise. | |
1519 | * mach-o.c (bfd_mach_o_fat_member_init): Likewise. | |
1520 | * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw), | |
1521 | (bfd_create): Likewise. | |
1522 | (_bfd_delete_bfd): Don't free filename. | |
1523 | (bfd_set_filename): Copy filename param to bfd_alloc'd memory, | |
1524 | return pointer to the copy or NULL on alloc fail. | |
1525 | * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test | |
1526 | result of bfd_set_filename. | |
1527 | * bfd-in2.h: Regenerate. | |
1528 | ||
3c568b8a AM |
1529 | 2020-05-20 Alan Modra <amodra@gmail.com> |
1530 | ||
1531 | PR 26011 | |
1532 | * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc | |
1533 | section size against file size. | |
1534 | (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise. | |
1535 | ||
6fd1d259 GN |
1536 | 2020-05-19 Gunther Nikl <gnikl@justmail.de> |
1537 | ||
1538 | PR 26005 | |
11c0dd51 NC |
1539 | * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc |
1540 | and memset when allocating memory for the sections_being_created | |
1541 | array. | |
6fd1d259 | 1542 | |
7e94cf6c SH |
1543 | 2020-05-19 Stafford Horne <shorne@gmail.com> |
1544 | ||
1545 | * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela | |
1546 | to relgot. | |
1547 | (or1k_elf_relocate_section): Access srelgot via | |
1548 | htab->root.srelgot. Add assertions for srelgot->contents. | |
1549 | Introduce local variable for srelgot to not reuse global | |
1550 | sreloc. | |
1551 | (or1k_elf_relocate_section): Fixup dynamic symbol detection. | |
1552 | (or1k_set_got_and_rela_sizes): New function. | |
1553 | (or1k_initial_exec_offset): New function. | |
1554 | (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks. | |
1555 | (or1k_elf_relocate_section): Allow for TLS to handle multiple | |
1556 | model access. | |
1557 | (or1k_elf_check_relocs): Use OR to set TLS access. | |
1558 | (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set | |
1559 | sizes. | |
1560 | (or1k_elf_size_dynamic_sections): Use | |
1561 | or1k_set_got_and_rela_sizes to set sizes. | |
1562 | (or1k_elf_relocate_section): Fixup PCREL relocation calculation. | |
1563 | (TCB_SIZE): New macro. | |
1564 | (tpoff): Use TCB_SIZE and alignment to calculate offset. | |
1565 | (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs) | |
1566 | (or1k_elf_size_dynamic_sections): Rename p to sec_relocs. | |
1567 | (allocate_dynrelocs): Rename s to splt or sgot based on usage. | |
1568 | (tpoff): Add dynamic boolean argument. | |
1569 | (or1k_elf_relocate_section): Pass dynamic flag to tpoff. | |
1570 | ||
7e057737 SP |
1571 | 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com> |
1572 | ||
1573 | * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club | |
1574 | BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14 | |
1575 | cases with BFD_RELOC_AARCH64_JUMP26. | |
1576 | (elfNN_aarch64_check_relocs): Likewise. | |
1577 | ||
765cf5f6 AM |
1578 | 2020-05-19 Alan Modra <amodra@gmail.com> |
1579 | ||
1580 | * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use | |
1581 | bfd_get_filename rather than accessing bfd->filename directly. | |
1582 | * aout-target.h (MY (object_p)): Likewise. | |
1583 | * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise. | |
1584 | * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag), | |
1585 | (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr), | |
1586 | (_bfd_archive_bsd44_construct_extended_name_table), | |
1587 | (_bfd_write_archive_contents, _bfd_compute_and_write_armap), | |
1588 | (_bfd_bsd_write_armap): Likewise. | |
1589 | * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise. | |
1590 | * cache.c (bfd_open_file): Likewise. | |
1591 | * ecoff.c (_bfd_ecoff_write_armap): Likewise. | |
1592 | * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise. | |
1593 | * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. | |
1594 | * elf32-frv.c (elf32_frv_relocate_section): Likewise. | |
1595 | * elf32-hppa.c (elf32_hppa_final_link): Likewise. | |
1596 | * elf32-nds32.c (nds32_elf_output_symbol_hook), | |
1597 | (patch_tls_desc_to_ie): Likewise. | |
1598 | * elf32-spu.c (sort_bfds, print_one_overlay_section), | |
1599 | (spu_elf_auto_overlay): Likewise. | |
1600 | * elf64-hppa.c (elf_hppa_final_link): Likewise. | |
1601 | * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise. | |
1602 | * elfcore.h (elf_core_file_matches_executable_p): Likewise. | |
1603 | * elflink.c (bfd_elf_size_dynamic_sections), | |
1604 | (elf_link_input_bfd): Likewise. | |
1605 | * linker.c (_bfd_generic_link_output_symbols): Likewise. | |
1606 | * mach-o.c (bfd_mach_o_follow_dsym), | |
1607 | (bfd_mach_o_close_and_cleanup): Likewise. | |
1608 | * opncls.c (_bfd_delete_bfd, _maybe_make_executable), | |
1609 | (find_separate_debug_file, get_build_id_name): Likewise. | |
1610 | * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise. | |
1611 | * plugin.c (bfd_plugin_open_input): Likewise. | |
1612 | * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise. | |
1613 | * som.c (som_write_armap): Likewise. | |
1614 | * srec.c (srec_write_record, srec_write_symbols): Likewise. | |
1615 | * vms-lib.c (_bfd_vms_lib_get_imagelib_file), | |
1616 | (_bfd_vms_lib_write_archive_contents): Likewise. | |
1617 | * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise. | |
1618 | ||
39a1432c AM |
1619 | 2020-05-19 Alan Modra <amodra@gmail.com> |
1620 | ||
1621 | PR 25713 | |
1622 | * bfdio.c (_bfd_real_fopen): Typo fix. | |
1623 | ||
ed02cdb5 NC |
1624 | 2020-05-18 Nick Clifton <nickc@redhat.com> |
1625 | ||
1626 | PR 26005 | |
1627 | * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory | |
1628 | for the sections_being_created array. | |
1629 | ||
7a87e9c8 AM |
1630 | 2020-05-18 Alan Modra <amodra@gmail.com> |
1631 | ||
1632 | * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so | |
1633 | they can be freed without also freeing internal_relocs. | |
1634 | ||
ca859a89 JC |
1635 | 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com> |
1636 | ||
1637 | PR 25713 | |
1638 | * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory | |
1639 | separators into DOS style when creating a WIN32 fullpath. | |
1640 | ||
fc46e8bd NC |
1641 | 2020-05-14 Nelson Chu <nelson.chu@sifive.com> |
1642 | ||
1643 | * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this | |
1644 | to initialize RISC-V tdata. | |
1645 | ||
533f049e GN |
1646 | 2020-05-12 Gunther Nikl <gnikl@justmail.de> |
1647 | ||
1648 | * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported | |
1649 | relocation size. | |
1650 | ||
94ba9882 AM |
1651 | 2020-05-11 Alan Modra <amodra@gmail.com> |
1652 | ||
1653 | * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp. | |
1654 | ||
7c1f4227 AM |
1655 | 2020-05-11 Alan Modra <amodra@gmail.com> |
1656 | ||
1657 | * elf64-ppc.c: Rename powerxx to power10 throughout. | |
1658 | ||
4d5acb1e AM |
1659 | 2020-05-11 Alan Modra <amodra@gmail.com> |
1660 | ||
1661 | PR 25961 | |
1662 | * coffgen.c (coff_get_normalized_symtab): Check that buffer | |
1663 | contains required number of auxents before processing any auxent. | |
1664 | * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended | |
1665 | file name from auxents for PE. | |
1666 | ||
7242fa8a GN |
1667 | 2020-05-04 Gunther Nikl <gnikl@justmail.de> |
1668 | ||
1669 | * aout-cris.c (DEFAULT_ARCH): Delete define. | |
1670 | (MY_set_arch_mach): Likewise. | |
1671 | (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture | |
1672 | of bfd_arch_cris. | |
1673 | (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits | |
1674 | of r_type before the shift. | |
1675 | ||
1676 | 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com> | |
cff69cf4 WD |
1677 | |
1678 | PR ld/25665 | |
1679 | * elfnn-aarch64.c (group_sections): Copy implementation from | |
1680 | elf32-arm.c. | |
1681 | ||
a2714d6c AM |
1682 | 2020-05-01 Alan Modra <amodra@gmail.com> |
1683 | ||
1684 | PR 25900 | |
1685 | * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before | |
1686 | accessing root.u.def of symbols. Also check root.u.def.section | |
1687 | is non-NULL. Reverse tests so as to make the logic positive. | |
1688 | ||
a8acd6ee AM |
1689 | 2020-05-01 Alan Modra <amodra@gmail.com> |
1690 | ||
1691 | PR 25882 | |
1692 | * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer | |
1693 | Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output. | |
1694 | ||
6b728d32 AM |
1695 | 2020-05-01 Alan Modra <amodra@gmail.com> |
1696 | ||
1697 | PR 25882 | |
1698 | * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME. | |
1699 | * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. | |
1700 | * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise. | |
1701 | * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. | |
1702 | * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. | |
1703 | * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. | |
1704 | * elf32-sh.c (sh_elf_merge_private_data): Likewise. | |
1705 | * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. | |
1706 | * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. | |
1707 | * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. | |
1708 | ||
91ed9b71 AM |
1709 | 2020-05-01 Alan Modra <amodra@gmail.com> |
1710 | ||
1711 | PR 25882 | |
1712 | * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags | |
1713 | from shared libraries. | |
1714 | ||
d548f47d MF |
1715 | 2020-04-29 Max Filippov <jcmvbkbc@gmail.com> |
1716 | ||
1717 | * elf32-xtensa.c (relax_section): Don't negate diff_value for | |
1718 | XTENSA_NDIFF relocations. Don't add sign bits whe diff_value | |
1719 | equals 0. Report overflow when the result has negative sign but | |
1720 | all significant bits are zero. | |
1721 | ||
dfa85db1 GN |
1722 | 2020-04-29 Gunther Nikl <gnikl@justmail.de> |
1723 | ||
1724 | * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations. | |
1725 | (aout_link_reloc_link_order): Likewise. Make r_length an unsigned. | |
1726 | ||
48e5bada AM |
1727 | 2020-04-28 Alan Modra <amodra@gmail.com> |
1728 | ||
1729 | * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check. | |
1730 | Emit warning message. | |
1731 | ||
251dae91 TC |
1732 | 2020-04-27 Tamar Christina <tamar.christina@arm.com> |
1733 | ||
1734 | * coff-i386.c (COFF_WITH_PE_BIGOBJ): New. | |
1735 | * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New. | |
1736 | * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec | |
1737 | to x86_64_pe_big_vec as it not a big-endian format. | |
1738 | (vec i386_pe_big_vec): New. | |
1739 | * configure.ac: Likewise. | |
1740 | * targets.c: Likewise. | |
1741 | * configure: Regenerate. | |
1742 | * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG, | |
1743 | COFF_WITH_PE_BIGOBJ): New. | |
1744 | * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG): | |
1745 | New. | |
1746 | (x86_64_pe_be_vec): Moved. | |
1747 | ||
27456742 AK |
1748 | 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com> |
1749 | ||
1750 | * elf-bfd.h (elfcore_write_arc_v2): Add prototype. | |
1751 | * elf.c (elfcore_grok_arc_v2): New function. | |
1752 | (elfcore_grok_note): Call the new function to handle the corresponding | |
1753 | note. | |
1754 | (elfcore_write_arc_v2): New function. | |
1755 | (elfcore_write_register_note): Call the new function to handle the | |
1756 | corresponding pseudo-sections. | |
1757 | ||
30ce8e47 MF |
1758 | 2020-04-22 Max Filippov <jcmvbkbc@gmail.com> |
1759 | ||
1760 | PR ld/25861 | |
1761 | * bfd-in2.h: Regenerated. | |
1762 | * elf32-xtensa.c (elf_howto_table): New entries for | |
1763 | R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}. | |
1764 | (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc) | |
1765 | (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and | |
1766 | R_XTENSA_NDIFF{8,16,32}. | |
1767 | * libbfd.h (bfd_reloc_code_real_names): Add names for | |
1768 | BFD_RELOC_XTENSA_PDIFF{8,16,32} and | |
1769 | BFD_RELOC_XTENSA_NDIFF{8,16,32}. | |
1770 | * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32} | |
1771 | and BFD_RELOC_XTENSA_NDIFF{8,16,32}. | |
1772 | ||
c36876fe TC |
1773 | 2020-04-21 Tamar Christina <tamar.christina@arm.com> |
1774 | ||
1775 | PR binutils/24753 | |
1776 | * compress.c (bfd_get_full_section_contents): Exclude sections with no | |
1777 | content. | |
1778 | ||
6f6fd151 L |
1779 | 2020-04-21 H.J. Lu <hongjiu.lu@intel.com> |
1780 | ||
1781 | PR ld/25849 | |
1782 | * elf-bfd.h (elf_backend_data): Add | |
1783 | elf_backend_strip_zero_sized_dynamic_sections. | |
1784 | (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype. | |
1785 | * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections): | |
1786 | New macro. | |
1787 | * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New | |
1788 | function. | |
1789 | * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections): | |
1790 | New macro. | |
1791 | (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections. | |
1792 | ||
1f7f2abb L |
1793 | 2020-04-21 H.J. Lu <hongjiu.lu@intel.com> |
1794 | ||
1795 | * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with | |
1796 | sec. | |
1797 | (elf64_alpha_check_relocs): Set sec instead of reltext. Warn | |
1798 | DT_TEXTREL with -M. | |
1799 | (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M. | |
1800 | ||
e04f33c0 NC |
1801 | 2020-04-21 Nick Clifton <nickc@redhat.com> |
1802 | ||
1803 | * po/sr.po: Updated Serbian translation. | |
1804 | ||
fad3d2c1 AM |
1805 | 2020-04-21 Alan Modra <amodra@gmail.com> |
1806 | ||
1807 | * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32 | |
1808 | processing. | |
1809 | ||
23c8270e SC |
1810 | 2020-04-20 Stephen Casner <casner@acm.org> |
1811 | ||
1812 | * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT | |
1813 | causing globals from linker script to be treated as debug symbols. | |
1814 | (translate_symbol_table): Don't sign-extend symbol values from 16 | |
1815 | to 64 bits in nm output. | |
1816 | ||
2efec98b AM |
1817 | 2020-04-20 Alan Modra <amodra@gmail.com> |
1818 | ||
1819 | * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too. | |
1820 | ||
18f97353 AM |
1821 | 2020-04-18 Alan Modra <amodra@gmail.com> |
1822 | ||
1823 | * section.c (bfd_is_const_section): Correct test for special | |
1824 | sections. | |
1825 | * bfd-in2.h: Regenerate. | |
1826 | ||
8d55d10a AM |
1827 | 2020-04-17 Alan Modra <amodra@gmail.com> |
1828 | ||
1829 | PR 25842 | |
1830 | * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on | |
1831 | NULL nodename. | |
1832 | ||
8e4979ac NC |
1833 | 2020-04-16 Nick Clifton <nickc@redhat.com> |
1834 | ||
1835 | PR 25803 | |
1836 | * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an | |
1837 | abort with a more helpful error message. | |
1838 | ||
aec72fda AM |
1839 | 2020-04-16 Alan Modra <amodra@gmail.com> |
1840 | ||
1841 | PR 25827 | |
1842 | * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't | |
1843 | strdup(0). | |
1844 | ||
95a51568 FS |
1845 | 2020-04-15 Fangrui Song <maskray@google.com> |
1846 | ||
1847 | PR binutils/24613 | |
1848 | * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR | |
1849 | to RM_DIAGNOSE plus a check of warn_unresolved_syms. | |
1850 | * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise. | |
1851 | * elf-bfd.h (_bfd_elf_large_com_section): Likewise. | |
1852 | * elf32-m32r.c (m32r_elf_relocate_section): Likewise. | |
1853 | * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. | |
1854 | * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. | |
1855 | * elf32-sh.c (sh_elf_relocate_section): Likewise. | |
1856 | * elf32-spu.c (spu_elf_relocate_section): Likewise. | |
1857 | * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. | |
1858 | * elflink.c (elf_link_output_extsym): Likewise. | |
1859 | * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. | |
1860 | ||
7ecb5154 AM |
1861 | 2020-04-15 Alan Modra <amodra@gmail.com> |
1862 | ||
1863 | PR 25823 | |
1864 | * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a | |
1865 | pointer into strings that may be freed for section name, always | |
1866 | allocate a new string. | |
1867 | ||
f717994f JMG |
1868 | 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de> |
1869 | Jan W. Jagersma <jwjagersma@gmail.com> | |
1870 | ||
1871 | * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL) | |
1872 | (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define. | |
1873 | (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out) | |
1874 | (_bfd_go32_mkobject): New functions. | |
1875 | * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL) | |
1876 | (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define. | |
1877 | (go32exe_mkobject): Call _bfd_go32_mkobject. | |
1878 | * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define. | |
1879 | (coff_set_alignment_hook): Define function for COFF_GO32_EXE | |
1880 | and COFF_GO32. | |
1881 | (coff_write_relocs): Enable extended reloc counter code if | |
1882 | COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32. | |
1883 | (coff_write_object_contents): Likewise. Pad section headers | |
1884 | for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out | |
1885 | instead of coff_swap_scnhdr_out. | |
1886 | * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to | |
1887 | enable extended reloc counter. | |
1888 | * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out): | |
1889 | Declare with ATTRIBUTE_UNUSED. | |
1890 | * libcoff-in.h: (struct coff_tdata): New field go32. | |
1891 | (obj_go32): Define. | |
1892 | * libcoff.h: Regenerate. | |
1893 | ||
34ca5531 FS |
1894 | 2020-04-14 Fangrui Song <maskray@google.com> |
1895 | ||
1896 | PR gas/25768 | |
1897 | * elf.c (assign_section_numbers): Always set .stab sh_entsize to | |
1898 | 12. | |
1899 | ||
fa1477dc SC |
1900 | 2020-04-14 Stephen Casner <casner@acm.org> |
1901 | ||
1902 | PR ld/25677 | |
1903 | * pdp11.c: Add implementation of --imagic option. | |
1904 | (adjust_o_magic): Fix objcopy --extract-symbol test. | |
1905 | * libaout.h (enum aout_magic): Add i_magic. | |
1906 | ||
a0543b0b RO |
1907 | 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
1908 | Nick Clifton <nickc@redhat.com> | |
1909 | ||
1910 | * elf32-sparc.c (sparc_final_write_processing): Fix whitespace. | |
1911 | <0>: Ignore. | |
1912 | <default>: Error rather than abort. | |
1913 | ||
3349112e L |
1914 | 2020-04-03 H.J. Lu <hongjiu.lu@intel.com> |
1915 | ||
1916 | PR ld/25767 | |
1917 | * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized | |
1918 | relocation section from section group. | |
1919 | ||
4d095f5b JJ |
1920 | 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com> |
1921 | ||
1922 | * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add | |
1923 | bfd->origin to file offset. | |
1924 | * bfdwin.c (bfd_get_file_window): Likewise. | |
1925 | * bfd.c: Clarify the use of the bfd->origin field. | |
1926 | * bfd-in2.h: Regenerate. | |
1927 | * coff-i386.c: Don't include go32exe.h. Allow overriding | |
1928 | coff_write_object_contents via COFF_WRITE_CONTENTS. | |
1929 | * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject) | |
1930 | (go32exe_write_object_contents): New functions. | |
1931 | (go32exe_temp_stub, go32exe_temp_stub_size): New static globals. | |
1932 | (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define. | |
1933 | (create_go32_stub): Remove check for 2k size limit. Read stub | |
1934 | from go32exe_temp_stub if present. | |
1935 | (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and | |
1936 | copy variable-length stub. | |
1937 | (go32_check_format): Read stub to go32exe_temp_stub, set | |
1938 | origin, return go32exe_cleanup. | |
1939 | (adjust_filehdr_in_post, adjust_filehdr_out_pre) | |
1940 | (adjust_filehdr_out_post, adjust_scnhdr_in_post) | |
1941 | (adjust_scnhdr_out_pre, adjust_scnhdr_out_post) | |
1942 | (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post): | |
1943 | Remove functions and their associated #defines. | |
1944 | * coffcode.h (coff_mkobject_hook): Remove stub copying code. | |
1945 | * libcoff-in.h: (struct coff_tdata): New field stub_size. | |
1946 | Rename field go32stub to stub. | |
1947 | * libcoff.h: Regenerate. | |
1948 | * coff-stgo32.c (go32_check_format): Rename to... | |
1949 | (go32exe_check_format): ...this. | |
1950 | (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to... | |
1951 | (go32exe_copy_private_bfd_data): ...this. | |
1952 | (stub_bytes): Rename to... | |
1953 | (go32exe_default_stub): ...this. | |
1954 | (create_go32_stub): Rename to... | |
1955 | (go32exe_create_stub): ...this. | |
1956 | * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc | |
1957 | when possible. | |
1958 | ||
382aae06 L |
1959 | 2020-04-01 H.J. Lu <hongjiu.lu@intel.com> |
1960 | ||
1961 | PR ld/25749 | |
1962 | PR ld/25754 | |
1963 | * elf32-i386.c (elf_i386_convert_load_reloc): Convert load | |
1964 | relocation to R_386_32 for relocation against non-preemptible | |
1965 | absolute symbol. | |
1966 | (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't | |
1967 | allocate dynamic relocation for non-preemptible absolute symbol. | |
1968 | (elf_i386_relocate_section): Pass sec to | |
1969 | GENERATE_DYNAMIC_RELOCATION_P. | |
1970 | * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved. | |
1971 | (elf_x86_64_convert_load_reloc): Covert load relocation to | |
1972 | R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible | |
1973 | absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32 | |
1974 | for non-preemptible absolute symbol if they overflow. | |
1975 | (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set | |
1976 | tls_type for GOT slot to GOT_ABS for non-preemptible absolute | |
1977 | symbol. Don't allocate dynamic relocation for non-preemptible | |
1978 | absolute symbol. | |
1979 | (elf_x86_64_relocate_section): Don't generate relative relocation | |
1980 | for GOTPCREL relocations aganst local absolute symbol. Pass sec | |
1981 | to GENERATE_DYNAMIC_RELOCATION_P. | |
1982 | * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation | |
1983 | against non-preemptible absolute symbol. | |
1984 | (_bfd_elf_x86_valid_reloc_p): New function. | |
1985 | (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for | |
1986 | GOT_ABS GOT slot. | |
1987 | * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC | |
1988 | argument. Don't generate dynamic relocation against | |
1989 | non-preemptible absolute symbol. | |
1990 | (ABS_SYMBOL_P): New. | |
1991 | (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation | |
1992 | against non-preemptible absolute symbol. | |
1993 | (GOT_ABS): New. | |
1994 | (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c. | |
1995 | (_bfd_elf_x86_valid_reloc_p): New. | |
1996 | ||
a7618269 TC |
1997 | 2020-04-01 Tamar Christina <tamar.christina@arm.com> |
1998 | ||
1999 | PR ld/16017 | |
2000 | * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0 | |
2001 | address in the GOT if in thumb only mode. | |
2002 | ||
15ccbdd7 TC |
2003 | 2020-04-01 Tamar Christina <tamar.christina@arm.com> |
2004 | ||
2005 | * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset. | |
2006 | ||
7b948a25 HPN |
2007 | 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com> |
2008 | ||
2009 | * mmo.c (mmo_scan): Create .text section only when needed, not | |
2010 | from the start. | |
2011 | ||
89b599df AM |
2012 | 2020-03-31 Alan Modra <amodra@gmail.com> |
2013 | ||
2014 | * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread | |
2015 | return value check. | |
2016 | ||
81699544 AM |
2017 | 2020-03-31 Alan Modra <amodra@gmail.com> |
2018 | ||
2019 | * vms-alpha.c (image_write): Check bounds for sections without | |
2020 | contents too. Error on non-zero write to section without | |
2021 | contents. | |
2022 | (_bfd_vms_slurp_etir): Check return of image_write* functions. | |
2023 | ||
b3b360de AM |
2024 | 2020-03-31 Alan Modra <amodra@gmail.com> |
2025 | ||
2026 | * tekhex.c (pass_over): Check is_eof before reading buffer. | |
2027 | ||
00386881 NC |
2028 | 2020-03-30 Nick Clifton <nickc@redhat.com> |
2029 | ||
2030 | PR binutils/pr25662 | |
2031 | * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp | |
2032 | field to timestamp and make it an integer. | |
2033 | * libcoff.h: Regenerate. | |
2034 | * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp | |
2035 | field in the pe_data structure rather than the insert_timestamp | |
2036 | field. | |
2037 | ||
988b7300 AM |
2038 | 2020-03-30 Alan Modra <amodra@gmail.com> |
2039 | ||
2040 | PR 25745 | |
2041 | * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form | |
2042 | statistics message. | |
2043 | ||
aa49fc22 NC |
2044 | 2020-03-26 Nick Clifton <nickc@redhat.com> |
2045 | ||
2046 | * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete. | |
2047 | * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove | |
2048 | prototype. | |
2049 | * libbfd.h: Regenerate. | |
2050 | ||
ff768510 AM |
2051 | 2020-03-26 Alan Modra <amodra@gmail.com> |
2052 | ||
2053 | * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread. | |
2054 | ||
f75fbe8a AM |
2055 | 2020-03-26 Alan Modra <amodra@gmail.com> |
2056 | ||
2057 | * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets | |
2058 | array. | |
2059 | (_bfd_vms_slurp_object_records): Rename "err" to "ok". | |
2060 | ||
aac88046 NC |
2061 | 2020-03-25 Nick Clifton <nickc@redhat.com> |
2062 | ||
2063 | * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New | |
2064 | function. | |
2065 | * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype. | |
2066 | * libbfd.h: Regenerate. | |
2067 | ||
cf2611fe SV |
2068 | 2020-03-25 Shahab Vahedi <shahab@synopsys.com> |
2069 | ||
2070 | * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the | |
2071 | correct field name in the output string. | |
2072 | ||
d16e3d2e AM |
2073 | 2020-03-25 Alan Modra <amodra@gmail.com> |
2074 | ||
2075 | PR 25662 | |
2076 | * elf.c (assign_file_positions_for_load_sections): Adjust offset | |
2077 | for SHT_NOBITS section if first in segment. | |
2078 | ||
1081065c L |
2079 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
2080 | ||
2081 | PR binutils/25708 | |
2082 | * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ... | |
2083 | (_bfd_elf_get_symbol_version_string): This. | |
2084 | * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ... | |
2085 | (_bfd_elf_get_symbol_version_string): This. | |
2086 | (bfd_elf_print_symbol): Pass TRUE to | |
2087 | _bfd_elf_get_symbol_version_string. | |
2088 | * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a | |
2089 | bfd_boolean argument. | |
2090 | * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise. | |
2091 | * targets.c (_bfd_get_symbol_version_string): Likewise. | |
2092 | (bfd_get_symbol_version_string): Likewise. | |
2093 | * bfd-in2.h: Regenerated. | |
2094 | ||
0b8448af | 2095 | 2020-03-24 Nick Clifton <nickc@redhat.com> |
e11cd7c4 | 2096 | Jaydeep Chauhan <jaydeepchauhan1494@gmail.com> |
0b8448af NC |
2097 | |
2098 | PR 25713 | |
2099 | * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on | |
2100 | Win32 systems. | |
2101 | ||
ec2e748a NC |
2102 | 2020-03-24 Nick Clifton <nickc@redhat.com> |
2103 | ||
2104 | PR 25681 | |
2105 | * elf.c (_bfd_elf_map_sections_to_segments): When looking for a | |
2106 | segment to use for PT_GNU_RELRO, ignore empty sections in a | |
2107 | segment's current list. | |
2108 | ||
cda7e560 L |
2109 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
2110 | ||
2111 | PR binutils/25717 | |
2112 | * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int. | |
2113 | ||
7e6e972f L |
2114 | 2020-03-24 H.J. Lu <hongjiu.lu@intel.com> |
2115 | ||
2116 | PR binutils/25708 | |
2117 | * elf-bfd.h (_bfd_elf_get_symbol_version_name): New. | |
2118 | * elf.c (_bfd_elf_get_symbol_version_name): New function. Based | |
2119 | on the previous _bfd_elf_get_symbol_version_string. | |
2120 | (_bfd_elf_get_symbol_version_string): Use it. | |
2121 | ||
65109548 AM |
2122 | 2020-03-24 Alan Modra <amodra@gmail.com> |
2123 | ||
2124 | * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended | |
2125 | name size. Use bfd_malloc rather than bfd_zmalloc, clearing just | |
2126 | struct areltdata. | |
2127 | ||
fdde2fb6 SH |
2128 | 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2129 | ||
2130 | * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment. | |
2131 | ||
cf28cfef AM |
2132 | 2020-03-23 Alan Modra <amodra@gmail.com> |
2133 | ||
2134 | * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and | |
2135 | symbol count. Allocate an extra byte to ensure name strings | |
2136 | are terminated. Sanity check name offsets. Release memory on | |
2137 | error return. | |
2138 | ||
5e737279 AM |
2139 | 2020-03-23 Alan Modra <amodra@gmail.com> |
2140 | ||
2141 | * i386msdos.c (msdos_object_p): Don't access e_lfanew when that | |
2142 | field hasn't been read. Remove unnecessary casts. | |
2143 | ||
c15a8f17 AM |
2144 | 2020-03-22 Alan Modra <amodra@gmail.com> |
2145 | ||
2146 | * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large | |
2147 | enough to read number of symbols. | |
2148 | ||
3d98c460 L |
2149 | 2020-03-20 H.J. Lu <hongjiu.lu@intel.com> |
2150 | ||
2151 | * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed. | |
2152 | (EXECUTABLE_SUFFIX): Likewise. | |
2153 | * config.in: Regenerated. | |
2154 | * configure: Likewise. | |
2155 | * plugin.c (bfd_plugin_close_and_cleanup): Defined as | |
2156 | _bfd_generic_close_and_cleanup. | |
2157 | (plugin_list_entry): Remove resolution_file, resolution_option, | |
2158 | real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc, | |
2159 | lto_wrapper, gcc_env and initialized, | |
2160 | (need_lto_wrapper_p): Removed. | |
2161 | (get_lto_wrapper): Likewise. | |
2162 | (setup_lto_wrapper_env): Likewise. | |
2163 | (register_all_symbols_read): Likewise. | |
2164 | (egister_cleanup): Likewise. | |
2165 | (get_symbols): Likewise. | |
2166 | (add_input_file): Likewise. | |
2167 | (bfd_plugin_set_program_name): Remove need_lto_wrapper. | |
2168 | (add_symbols): Updated. | |
2169 | (try_claim): Likewise. | |
2170 | (try_load_plugin): Likewise. | |
2171 | (bfd_plugin_canonicalize_symtab): Likewise. | |
2172 | * plugin.h (bfd_plugin_set_program_name): Remove int argument. | |
2173 | (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms. | |
2174 | ||
c3a1714c L |
2175 | 2020-03-19 H.J. Lu <hongjiu.lu@intel.com> |
2176 | ||
2177 | PR binutils/25640 | |
2178 | * plugin.c (plugin_list_entry): Add has_symbol_type. | |
2179 | (add_symbols_v2): New function. | |
2180 | (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin | |
2181 | provides symbol type. | |
2182 | (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2. | |
2183 | (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if | |
2184 | available. | |
2185 | ||
67338173 AM |
2186 | 2020-03-20 Alan Modra <amodra@gmail.com> |
2187 | ||
2188 | * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large | |
2189 | enough to read number of symbols. | |
2190 | ||
a859124d AM |
2191 | 2020-03-20 Alan Modra <amodra@gmail.com> |
2192 | ||
2193 | * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL | |
2194 | backend functions for NULL before calling. | |
2195 | (copy_special_section_fields, _bfd_elf_copy_private_bfd_data), | |
2196 | (bfd_section_from_shdr, assign_section_numbers): Likewise. | |
2197 | * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise. | |
2198 | * elfnn-ia64.c (ignore_errors): New function. | |
2199 | (elf_backend_link_order_error_handler): Redefine as ignore_errors. | |
2200 | ||
f3a08f77 NC |
2201 | 2020-03-19 Nick Clifton <nickc@redhat.com> |
2202 | ||
2203 | PR 25676 | |
2204 | * dwarf2.c (struct varinfo): Add unit_offset field to record the | |
2205 | location of the varinfo in the unit's debug info data. Change the | |
2206 | type of the stack field to a boolean. | |
2207 | (lookup_var_by_offset): New function. Returns the varinfo | |
2208 | structure for the variable described at the given offset in the | |
2209 | unit's debug info. | |
2210 | (scan_unit_for_symbols): Add support for variables which have the | |
2211 | DW_AT_specification attribute. | |
2212 | ||
6a541707 NC |
2213 | 2020-03-19 Nick Clifton <nickc@redhat.com> |
2214 | ||
2215 | PR 25699 | |
2216 | * elf.c (bfd_elf_set_group_contents): Replace assertion with an | |
2217 | error return. | |
2218 | ||
effc14f5 SH |
2219 | 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2220 | ||
2221 | * elfxx-riscv.c (riscv_parse_subset): Don't use C99. | |
2222 | ||
ac4bf06c NC |
2223 | 2020-03-18 Nick Clifton <nickc@redhat.com> |
2224 | ||
2225 | PR 25673 | |
2226 | * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal | |
2227 | memory access when processing a corrupt secondary reloc section. | |
2228 | ||
53215f21 CL |
2229 | 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org> |
2230 | ||
2231 | * elf32-arm.c (arm_build_one_stub): Emit a fatal error message | |
2232 | instead of calling abort. | |
2233 | * elf32-csky.c (csky_build_one_stub): Likewise. | |
2234 | * elf32-hppa.c (hppa_build_one_stub): Likewise. | |
2235 | * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. | |
2236 | * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. | |
2237 | * elf32-metag.c (metag_build_one_stub): Likewise. | |
2238 | * elf32-nios2.c (nios2_build_one_stub): Likewise. | |
2239 | * elf64-ppc.c (ppc_build_one_stub): Likewise. | |
2240 | (ppc_size_one_stub): Likewise. | |
2241 | * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. | |
2242 | ||
327ef784 NC |
2243 | 2020-03-17 Nick Clifton <nickc@redhat.com> |
2244 | ||
d3c3c542 | 2245 | PR 25688 |
327ef784 NC |
2246 | * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions |
2247 | with error messages. | |
2248 | ||
ecbbbdba NC |
2249 | 2020-03-17 Nick Clifton <nickc@redhat.com> |
2250 | ||
2251 | PR 25687 | |
2252 | * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant | |
2253 | free. Add free on another failure path. | |
2254 | ||
4b3ecb3b AM |
2255 | 2020-03-16 Alan Modra <amodra@gmail.com> |
2256 | ||
2257 | PR 25675 | |
2258 | * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless | |
2259 | we have a non-zero section count. Do lma comparison in octets. | |
2260 | ||
7bac4137 AM |
2261 | 2020-03-16 Alan Modra <amodra@gmail.com> |
2262 | ||
2263 | * vms-alpha.c (dst_restore_location): Validate index into | |
2264 | dst_ptr_offsets array before accessing. Return status. | |
2265 | (dst_retrieve_location): Similarly, making "loc" parameter a | |
2266 | pointer to return value. | |
2267 | (_bfd_vms_slurp_etir): Update calls to above functions. | |
2268 | ||
8b5d0a4f KR |
2269 | 2020-03-14 Kamil Rytarowski <n54@gmx.com> |
2270 | ||
2271 | * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips | |
2272 | targets. | |
2273 | * configure: Regenerated. | |
2274 | ||
48e81d7f AM |
2275 | 2020-03-14 Alan Modra <amodra@gmail.com> |
2276 | ||
2277 | * section.c (BFD_FAKE_SECTIONS): Formatting. | |
2278 | * bfd-in2.h: Regenerate. | |
2279 | ||
06d949ec KR |
2280 | 2020-03-13 Kamil Rytarowski <n54@gmx.com> |
2281 | ||
2282 | * elf.c (elfcore_grok_netbsd_note): Add support for | |
2283 | NT_NETBSDCORE_LWPSTATUS notes. | |
2284 | ||
abf874aa CL |
2285 | 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org> |
2286 | ||
2287 | * bfd-in2.h: Regenerate. | |
2288 | * section.c (asection): Add already_assigned field. | |
2289 | (BFD_FAKE_SECTION): Add default initializer for it. | |
2290 | * ecoff.c (bfd_debug_section): Initialize already_assigned field. | |
2291 | * elf32-arm.c (arm_build_one_stub): Add support for | |
2292 | non_contiguous_regions. | |
2293 | * elf32-csky.c (csky_build_one_stub): Likewise. | |
2294 | * elf32-hppa.c (hppa_build_one_stub): Likewise. | |
2295 | * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. | |
2296 | * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. | |
2297 | * elf32-metag.c (metag_build_one_stub): Likewise. | |
2298 | * elf32-nios2.c (nios2_build_one_stub): Likewise. | |
2299 | * elf64-ppc.c (ppc_build_one_stub): Likewise. | |
2300 | (ppc_size_one_stub): Likewise. | |
2301 | * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. | |
2302 | * elflink.c (elf_link_input_bfd): Likewise. | |
2303 | ||
74e10d17 L |
2304 | 2020-03-13 H.J. Lu <hongjiu.lu@intel.com> |
2305 | ||
2306 | PR ld/24920 | |
2307 | * elf-linker-x86.h (elf_linker_x86_params): Add | |
2308 | static_before_all_inputs and has_dynamic_linker. | |
2309 | * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report | |
2310 | dynamic input objects if -static is passed at command-line | |
2311 | before all input files without --dynamic-linker unless | |
2312 | --no-dynamic-linker is used. | |
2313 | ||
015ec493 KR |
2314 | 2020-03-13 Kamil Rytarowski <n54@gmx.com> |
2315 | ||
2316 | * elf.c (elfcore_grok_netbsd_note): Add support for aarch64. | |
2317 | ||
66631823 CE |
2318 | 2020-03-13 Christian Eggers <ceggers@gmx.de> |
2319 | ||
2320 | * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of | |
2321 | "p_paddr" from "at". | |
2322 | * elfcode.h (bfd_from_remote_memory): Add units to several | |
2323 | parameters. New local "opb". Fix usage of p_align. Fix | |
2324 | calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix | |
2325 | call of target_read_memory. | |
2326 | * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix | |
2327 | calculation of "offset" and "output_offset". | |
2328 | (bfd_elf_final_link): New local "opb". Fix calculation of "size" | |
2329 | from "offset" and fix calculation of "end" from "vma+size". Fix | |
2330 | comparison between "sh_addr" and "vma"/"output_offset". | |
2331 | (bfd_elf_discard_info): Fix calculation of "eh_alignment". | |
2332 | * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size | |
2333 | member. | |
2334 | * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/ | |
2335 | octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of | |
2336 | "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix | |
2337 | assignment of p_paddr from phdr_lma. Fix comparison between | |
2338 | "lma+size" and "next->lma". | |
2339 | (elf_sort_segments): Fix assignment from p_paddr to lma. | |
2340 | (assign_file_positions_for_load_sections): Add unit (bytes) to | |
2341 | local "align". Fix calculation of local "off_adjust". Fix | |
2342 | calculation of local "filehdr_vaddr". | |
2343 | (assign_file_positions_for_non_load_sections): New local "opb". | |
2344 | Fix calculation of "end" from "p_size". Fix comparison between | |
2345 | "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz" | |
2346 | from "end" and "p_vaddr". | |
2347 | (rewrite_elf_program_header): Fix comparison between p_vaddr and | |
2348 | vma. Fix assignment to p_paddr from lma. Fix comparison between | |
2349 | p_paddr and lma. Fix assignment to p_paddr from lma. | |
2350 | * merge.c (sec_merge_emit): New local "opb". Convert | |
2351 | "alignment_power" to octets. | |
2352 | (_bfd_add_merge_section): New locals "alignment_power" and | |
2353 | "opb". Fix comparison between "alignment_power" and | |
2354 | "sizeof(align)". | |
2355 | (_bfd_merge_sections): New local "opb". Divide size by opb | |
2356 | before checking align mask. | |
2357 | ||
502794d4 CE |
2358 | 2020-03-13 Christian Eggers <ceggers@gmx.de> |
2359 | ||
2360 | * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp | |
2361 | opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting | |
2362 | section LMA/VMA. | |
2363 | (_bfd_elf_make_section_from_phdr): Similarly. | |
2364 | (elf_fake_sections): Fix calculation of | |
2365 | Elf_Internal_shdr::sh_addr from section VMA. | |
2366 | (_bfd_elf_map_sections_to_segments): Fix mixup between octets | |
2367 | and bytes. | |
2368 | (assign_file_positions_for_load_sections): Fix calculations of | |
2369 | Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix | |
2370 | comparison between program header address and section LMA. | |
2371 | (assign_file_positions_for_non_load_sections): Likewise. | |
2372 | (rewrite_elf_program_header): Likewise. Introduce new temp opb. | |
2373 | (IS_CONTAINED_BY_VMA): Add parameter opb. | |
2374 | (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT, | |
2375 | INCLUDE_SECTION_IN_SEGMENT): Likewise. | |
2376 | (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT. | |
2377 | Fix calculations of p_addr_valid and p_vaddr_offset. | |
2378 | * elflink.c (elf_link_add_object_symbols): Multiply section VMA | |
2379 | with octets per byte when comparing against p_vaddr. | |
2380 | ||
8248d21a AM |
2381 | 2020-03-11 Alan Modra <amodra@gmail.com> |
2382 | ||
2383 | * som.c (setup_sections): Sanity check subspace.name. | |
2384 | ||
435edf0b AM |
2385 | 2020-03-11 Alan Modra <amodra@gmail.com> |
2386 | ||
2387 | * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. | |
2388 | ||
6b5e16ff AM |
2389 | 2020-03-10 Alan Modra <amodra@gmail.com> |
2390 | ||
2391 | PR 25648 | |
2392 | * ihex.c (ihex_write_object_contents): Don't assume ordering of | |
2393 | addresses here. | |
2394 | ||
2f57795b AM |
2395 | 2020-03-09 Alan Modra <amodra@gmail.com> |
2396 | ||
2397 | * wasm-module.c (wasm_scan): Sanity check file name length | |
2398 | before allocating memory. Move common section setup code. Do | |
2399 | without bfd_tell to calculate section size. | |
2400 | ||
a0dcf297 NC |
2401 | 2020-03-06 Nick Clifton <nickc@redhat.com> |
2402 | ||
2403 | * elf.c (_bfd_elf_set_section_contents): Replace call to abort | |
2404 | with error messages and failure return values. | |
2405 | ||
e15a8da9 MF |
2406 | 2020-03-05 Max Filippov <jcmvbkbc@gmail.com> |
2407 | ||
2408 | * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic | |
2409 | relocation sections for any removed reference to a dynamic symbol. | |
2410 | ||
a8e14f4c NC |
2411 | 2020-03-05 Nick Clifton <nickc@redhat.com> |
2412 | ||
2413 | * elf-bfd.h (struct elf_backend_data): Add new fields: | |
2414 | init_secondary_reloc_section, slurp_secondary_reloc_section, | |
2415 | write_secondary_reloc_section. | |
2416 | (_bfd_elf_init_secondary_reloc_section): Prototype. | |
2417 | (_bfd_elf_slurp_secondary_reloc_section): Prototype. | |
2418 | (_bfd_elf_write_secondary_reloc_section): Prototype. | |
2419 | * elf.c ( bfd_section_from_shdr): Invoke the new | |
2420 | init_secondary_reloc_section backend function, if defined, when a | |
2421 | second reloc section is encountered. | |
2422 | (swap_out_syms): Invoke the new symbol_section_index function, if | |
2423 | defined, when computing the section index of an OS/PROC specific | |
2424 | symbol. | |
2425 | (_bfd_elf_init_secondary_reloc_section): New function. | |
2426 | (_bfd_elf_slurp_secondary_reloc_section): New function. | |
2427 | (_bfd_elf_write_secondary_reloc_section): New function. | |
2428 | (_bfd_elf_copy_special_section_fields): New function. | |
2429 | * elfcode.h (elf_write_relocs): Invoke the new | |
2430 | write_secondary_relocs function, if defined, in order to emit | |
2431 | secondary relocs. | |
2432 | (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs | |
2433 | function, if defined, in order to read in secondary relocs. | |
2434 | * elfxx-target.h (elf_backend_copy_special_section_fields): | |
2435 | Provide a non-NULL default definition. | |
2436 | (elf_backend_init_secondary_reloc_section): Likewise. | |
2437 | (elf_backend_slurp_secondary_reloc_section): Likewise. | |
2438 | (elf_backend_write_secondary_reloc_section): Likewise. | |
2439 | (struct elf_backend_data elfNN_bed): Add initialisers for the new | |
2440 | fields. | |
2441 | * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo | |
2442 | * configure: Regenerate. | |
2443 | ||
6f8f95b4 AM |
2444 | 2020-03-05 Alan Modra <amodra@gmail.com> |
2445 | ||
2446 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size | |
2447 | against file size before allocating memory. Use bfd_alloc rather | |
2448 | than bfd_zalloc for carsym/strings memory. | |
2449 | ||
233bf4f8 AM |
2450 | 2020-03-04 Alan Modra <amodra@gmail.com> |
2451 | ||
2452 | * elf.c (elf_fake_sections): Ensure sh_addralign is such that | |
2453 | sh_addr mod sh_addalign is zero. | |
2454 | ||
1039fd9a AM |
2455 | 2020-03-04 Alan Modra <amodra@gmail.com> |
2456 | ||
2457 | * format.c (bfd_check_format_matches): Call cleanup on error exit. | |
2458 | ||
f5714099 AM |
2459 | 2020-03-03 Alan Modra <amodra@gmail.com> |
2460 | ||
2461 | * format.c (struct bfd_preserve): Add cleanup field. | |
2462 | (bfd_preserve_save): Add cleanup param and save. | |
2463 | (bfd_preserve_restore): Return cleanup. | |
2464 | (bfd_preserve_finish): Call the cleanup for the discarded match. | |
2465 | (bfd_check_format_matches): Pass cleanup to bfd_preserve_save, | |
2466 | and clear when preserving a match. Restore cleanup too when | |
2467 | restoring that match. | |
2468 | ||
40b35c78 AM |
2469 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2470 | ||
2471 | * cisco-core.c (cisco_core_file_p): Return bfd_cleanup. | |
2472 | * hpux-core.c (hpux_core_core_file_p): Update prototype. | |
2473 | * sco5-core.c (sco5_core_file_p): Return bfd_cleanup. | |
2474 | (core_sco5_vec): Correct initialisers. | |
2475 | ||
601b73d5 AM |
2476 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2477 | ||
2478 | * aix386-core.c (aix386_core_file_p): Return bfd_cleanup. | |
2479 | * aix5ppc-core.c (xcoff64_core_p): Likewise. | |
2480 | * cisco-core.c (cisco_core_file_validate): Likewise. | |
2481 | * hppabsd-core.c (hppabsd_core_core_file_p): Likewise. | |
2482 | * hpux-core.c (hpux_core_core_file_p): Likewise. | |
2483 | * irix-core.c (irix_core_core_file_p): Likewise. | |
2484 | * lynx-core.c (lynx_core_file_p): Likewise. | |
2485 | * netbsd-core.c (netbsd_core_file_p): Likewise. | |
2486 | * osf-core.c (osf_core_core_file_p): Likewise. | |
2487 | * ptrace-core.c (ptrace_unix_core_file_p): Likewise. | |
2488 | * sco5-core.c (sco5_core_file_p): Likewise. | |
2489 | ||
728d32c4 L |
2490 | 2020-03-02 H.J. Lu <hongjiu.lu@intel.com> |
2491 | ||
2492 | * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup. | |
2493 | ||
cb001c0d AM |
2494 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2495 | ||
2496 | * targets.c (bfd_cleanup): New typedef. | |
2497 | (struct bfd <_bfd_check_format>): Return a bfd_cleanup. | |
2498 | * libbfd-in.h (_bfd_no_cleanup): Define. | |
2499 | * format.c (bfd_reinit): Add cleanup parameter, call it. | |
2500 | (bfd_check_format_matches): Set cleanup from _bfd_check_format | |
2501 | call and pass to bfd_reinit. Delete temp, use abfd->xvec instead. | |
2502 | * aout-target.h (callback, object_p): Return bfd_cleanup. | |
2503 | * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise. | |
2504 | * archive.c (bfd_generic_archive_p): Likewise. | |
2505 | * binary.c (binary_object_p): Likewise. | |
2506 | * coff-alpha.c (alpha_ecoff_object_p): Likewise. | |
2507 | * coff-ia64.c (ia64coff_object_p): Likewise. | |
2508 | * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise. | |
2509 | * coff-sh.c (coff_small_object_p): Likewise. | |
2510 | * coff-stgo32.c (go32_check_format): Likewise. | |
2511 | * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p), | |
2512 | (xcoff64_core_p): Likewise. | |
2513 | * coffgen.c (coff_real_object_p, coff_object_p): Likewise. | |
2514 | * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p), | |
2515 | (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise. | |
2516 | * elfcode.h (elf_object_p): Likewise. | |
2517 | * elfcore.h (elf_core_file_p): Likewise. | |
2518 | * i386msdos.c (msdos_object_p): Likewise. | |
2519 | * ihex.c (ihex_object_p): Likewise. | |
2520 | * libaout.h (some_aout_object_p): Likewise. | |
2521 | * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target), | |
2522 | (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise. | |
2523 | * libbfd.c (_bfd_dummy_target): Likewise. | |
2524 | * libcoff-in.h (coff_object_p): Likewise. | |
2525 | * mach-o-aarch64.c (bfd_mach_o_arm64_object_p), | |
2526 | (bfd_mach_o_arm64_core_p): Likewise. | |
2527 | * mach-o-arm.c (bfd_mach_o_arm_object_p), | |
2528 | (bfd_mach_o_arm_core_p): Likewise. | |
2529 | * mach-o-i386.c (bfd_mach_o_i386_object_p), | |
2530 | (bfd_mach_o_i386_core_p): Likewise. | |
2531 | * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p), | |
2532 | (bfd_mach_o_x86_64_core_p): Likewise. | |
2533 | * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p), | |
2534 | (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise. | |
2535 | * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p), | |
2536 | (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise. | |
2537 | * mmo.c (mmo_object_p): Likewise. | |
2538 | * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise. | |
2539 | * peicode.h (coff_real_object_p, pe_ILF_object_p), | |
2540 | (pe_bfd_object_p): Likewise. | |
2541 | * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise. | |
2542 | * ppcboot.c (ppcboot_object_p): Likewise. | |
2543 | * rs6000-core.c (rs6000coff_core_p): Likewise. | |
2544 | * som.c (som_object_setup, som_object_p): Likewise. | |
2545 | * srec.c (srec_object_p, symbolsrec_object_p): Likewise. | |
2546 | * tekhex.c (tekhex_object_p): Likewise. | |
2547 | * vms-alpha.c (alpha_vms_object_p): Likewise. | |
2548 | * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p), | |
2549 | (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise. | |
2550 | * wasm-module.c (wasm_object_p): Likewise. | |
2551 | * xsym.c (bfd_sym_object_p): Likewise. | |
2552 | * xsym.h (bfd_sym_object_p): Likewise. | |
2553 | * aoutx.h (some_aout_object_p): Likewise, and callback parameter | |
2554 | return type. | |
2555 | * pdp11.c (some_aout_object_p): Likewise. | |
2556 | * plugin.c (register_ld_plugin_object_p): Update object_p | |
2557 | parameter type. | |
2558 | * plugin.h (register_ld_plugin_object_p): Likewise. | |
2559 | * bfd-in2.h: Regenerate. | |
2560 | * libbfd.h: Regenerate. | |
2561 | * libcoff.h: Regenerate. | |
2562 | ||
a4dd6c97 AM |
2563 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2564 | ||
2565 | * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to | |
2566 | applicable section flags. | |
2567 | * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise. | |
2568 | (mips_ecoff_bele_vec): Likewise. | |
2569 | * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata | |
2570 | and .sbss sections. | |
2571 | * ecoff.c (_bfd_ecoff_new_section_hook): Likewise. | |
2572 | (_bfd_ecoff_styp_to_sec_flags): Likewise. | |
2573 | ||
bf577467 AM |
2574 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2575 | ||
2576 | * elf32-m32r.c (m32r_elf_section_flags): New function. | |
2577 | (elf_backend_section_flags): Define. | |
2578 | * elf32-nds32.c (nds32_elf_section_flags): New function. | |
2579 | (elf_backend_section_flags): Define. | |
2580 | * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for | |
2581 | .sbss and .sdata sections. | |
2582 | * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA | |
2583 | for SHF_V850_GPREL sections. | |
2584 | * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated | |
2585 | FIXME. | |
2586 | * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA | |
2587 | for SHF_PARISC_SHORT sections. | |
2588 | * elf64-ppc.c (ppc64_elf_section_flags): New function. | |
2589 | (elf_backend_section_flags): Define. | |
2590 | * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA | |
2591 | for SHF_MIPS_GPREL sections. Delete FIXME. | |
2592 | ||
8c803a2d AM |
2593 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2594 | ||
2595 | * elf-bfd.h (elf_backend_section_flags): Remove flagword* param. | |
2596 | * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before | |
2597 | calling elf_backend_section_flags with adjusted params. Use | |
2598 | newsect->flags past that point. | |
2599 | (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for | |
2600 | special sections. | |
2601 | (_bfd_elf_init_private_section_data): Allow normal sh_type sections | |
2602 | to have their type overridden, and all sh_flags but processor and | |
2603 | os specific. | |
2604 | * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params. | |
2605 | * elf32-mep.c (mep_elf_section_flags): Likewise. | |
2606 | * elf32-nios2.c (nios2_elf32_section_flags): Likewise. | |
2607 | * elf64-alpha.c (elf64_alpha_section_flags): Likewise. | |
2608 | * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise. | |
2609 | * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise. | |
2610 | * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker | |
2611 | stub BFD and non-aarch64 input files when scanning for stubs. | |
2612 | ||
7d4b2d2d AM |
2613 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2614 | ||
2615 | * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper | |
2616 | limit to decompressed element size. | |
2617 | ||
26f60d59 AM |
2618 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2619 | ||
2620 | * vms-lib.c (vms_traverse_index): Add recur_count param and | |
2621 | update calls. Fail on excessive recursion. | |
2622 | ||
9cb56943 AM |
2623 | 2020-03-02 Alan Modra <amodra@gmail.com> |
2624 | ||
2625 | * vms-alpha.c (vms_get_remaining_object_record): Use | |
2626 | bfd_realloc_or_free rather than bfd_realloc. | |
2627 | (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise. | |
2628 | (dst_define_location, parse_module): Likewise, and check realloc | |
2629 | return status before using memory. Return status from function | |
2630 | adjusting all callers. | |
2631 | ||
182ec670 AM |
2632 | 2020-02-28 Alan Modra <amodra@gmail.com> |
2633 | ||
2634 | * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths. | |
2635 | ||
1b088c82 AM |
2636 | 2020-02-28 Alan Modra <amodra@gmail.com> |
2637 | ||
2638 | * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read. | |
2639 | Remove duplicate undersize check. | |
2640 | ||
5f602802 AM |
2641 | 2020-02-27 Alan Modra <amodra@gmail.com> |
2642 | ||
2643 | PR 24511 | |
2644 | * mmo.c (mmo_scan): Set SEC_DATA for .data. | |
2645 | ||
49d9fd42 AM |
2646 | 2020-02-27 Alan Modra <amodra@gmail.com> |
2647 | ||
2648 | PR 24511 | |
2649 | * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries. | |
2650 | (coff_section_type): Adjust comment. | |
2651 | (decode_section_type): Likewise. Call coff_section_type before | |
2652 | decode_section_type. | |
2653 | (bfd_decode_symclass): Use 'c' for common sections other than | |
2654 | the standard one. | |
2655 | ||
05f52dc2 AM |
2656 | 2020-02-27 Alan Modra <amodra@gmail.com> |
2657 | ||
2658 | * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one | |
2659 | malloc'd block. | |
2660 | ||
ff69a894 AM |
2661 | 2020-02-27 Alan Modra <amodra@gmail.com> |
2662 | ||
2663 | * bfd.c (bfd_stat_arch_elt): Use vector of containing archive, | |
2664 | if file is an archive element. | |
2665 | * bfd-in2.h: Regenerate. | |
2666 | ||
02f7e7ee AM |
2667 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2668 | ||
2669 | * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and | |
2670 | bfd_set_error on failing test. Don't bother changing bfd_error on | |
2671 | file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE. | |
2672 | Check sym name is within string buffer. Use size_t for some vars. | |
2673 | (do_slurp_coff_armap): Use size_t for some variables, fix size of | |
2674 | int_buf. Don't change bfd_error on file read error. Use | |
2675 | _bfd_mul_overflow when calculating carsym buffer size. Reorder | |
2676 | calculations to catch overflows before they occur. malloc and | |
2677 | free raw armap rather than using bfd_alloc. Read raw armap before | |
2678 | allocating carsym+strings buffer. | |
2679 | (_bfd_slurp_extended_name_table): Localize variables. Check | |
2680 | name size against file size. | |
2681 | ||
cc4c4f40 AM |
2682 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2683 | ||
2684 | * vms-lib.c (vms_lib_read_index): Release correct buffer. | |
2685 | ||
e0b317de AM |
2686 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2687 | ||
2688 | * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than | |
2689 | malloc. Check for NULL return from bfd_malloc. | |
2690 | (rx_table_find, rx_table_map): Likewise. | |
2691 | (rx_set_section_contents): Check bfd_alloc return. | |
2692 | (rx_dump_symtab): Don't alloc internal_syms or external_syms. | |
2693 | ||
dc1e8a47 AM |
2694 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2695 | ||
2696 | * aoutx.h: Indent labels correctly. Format error strings. | |
2697 | * archive.c: Likewise. | |
2698 | * archive64.c: Likewise. | |
2699 | * coff-arm.c: Likewise. | |
2700 | * coff-rs6000.c: Likewise. | |
2701 | * coff-stgo32.c: Likewise. | |
2702 | * cpu-arm.c: Likewise. | |
2703 | * dwarf2.c: Likewise. | |
2704 | * elf-ifunc.c: Likewise. | |
2705 | * elf-properties.c: Likewise. | |
2706 | * elf-s390-common.c: Likewise. | |
2707 | * elf-strtab.c: Likewise. | |
2708 | * elf.c: Likewise. | |
2709 | * elf32-arm.c: Likewise. | |
2710 | * elf32-bfin.c: Likewise. | |
2711 | * elf32-cr16.c: Likewise. | |
2712 | * elf32-csky.c: Likewise. | |
2713 | * elf32-i386.c: Likewise. | |
2714 | * elf32-m68k.c: Likewise. | |
2715 | * elf32-msp430.c: Likewise. | |
2716 | * elf32-nds32.c: Likewise. | |
2717 | * elf32-nios2.c: Likewise. | |
2718 | * elf32-pru.c: Likewise. | |
2719 | * elf32-xtensa.c: Likewise. | |
2720 | * elf64-ia64-vms.c: Likewise. | |
2721 | * elf64-x86-64.c: Likewise. | |
2722 | * elfcode.h: Likewise. | |
2723 | * elfcore.h: Likewise. | |
2724 | * elflink.c: Likewise. | |
2725 | * elfnn-aarch64.c: Likewise. | |
2726 | * elfnn-ia64.c: Likewise. | |
2727 | * elfnn-riscv.c: Likewise. | |
2728 | * elfxx-mips.c: Likewise. | |
2729 | * elfxx-sparc.c: Likewise. | |
2730 | * elfxx-x86.c: Likewise. | |
2731 | * i386lynx.c: Likewise. | |
2732 | * merge.c: Likewise. | |
2733 | * pdp11.c: Likewise. | |
2734 | * plugin.c: Likewise. | |
2735 | * reloc.c: Likewise. | |
2736 | ||
e310298c AM |
2737 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2738 | ||
2739 | PR 25593 | |
2740 | * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to | |
2741 | "dyn_loaded". | |
2742 | (bfd_elf_add_dt_needed_tag): Declare. | |
2743 | * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf. | |
2744 | * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename | |
2745 | from elf_add_dt_needed_tag. Remove soname and doit param. | |
2746 | (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag | |
2747 | to see whether as-needed lib is already loaded, use dyn_loaded | |
2748 | list instead. When saving and restoring around as-needed lib | |
2749 | handle possibility that dynstr has not been initialised. Don't | |
2750 | add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs. | |
2751 | Mark libs loaded via DT_NEEDED entries of other libs with | |
2752 | DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of | |
2753 | the output. | |
2754 | (elf_link_check_versioned_symbol): Remove now unneccesary | |
2755 | DYNAMIC check when traversing dyn_loaded list. | |
2756 | ||
b570b954 AM |
2757 | 2020-02-26 Alan Modra <amodra@gmail.com> |
2758 | ||
2759 | * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes. | |
2760 | ||
ecda9016 L |
2761 | 2020-02-25 H.J. Lu <hongjiu.lu@intel.com> |
2762 | ||
2763 | PR binutils/25584 | |
2764 | * plugin.c (need_lto_wrapper_p): New. | |
2765 | (bfd_plugin_set_program_name): Add an int argument to set | |
2766 | need_lto_wrapper_p. | |
2767 | (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't | |
2768 | set. | |
2769 | * plugin.h (bfd_plugin_set_program_name): Add an int argument. | |
2770 | ||
a98c743f AM |
2771 | 2020-02-24 Alan Modra <amodra@gmail.com> |
2772 | ||
2773 | * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks. | |
2774 | ||
c893ce36 AM |
2775 | 2020-02-24 Alan Modra <amodra@gmail.com> |
2776 | ||
2777 | * vms-lib.c (struct carsym_mem): Add limit. | |
2778 | (vms_add_index): Heed limit. | |
2779 | (vms_traverse_index): Catch buffer overflows. Remove outdated fixme. | |
2780 | (vms_lib_read_index): Set up limit. Catch 32-bit overflow. | |
2781 | Always return actual number read. | |
2782 | (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace | |
2783 | assertion with error exit. | |
2784 | ||
7b3c2715 AM |
2785 | 2020-02-22 Alan Modra <amodra@gmail.com> |
2786 | ||
2787 | PR 25585 | |
2788 | * elf.c (assign_file_positions_for_load_sections): Continue linking | |
2789 | on "PHDR segment not covered by LOAD segment" errors. | |
2790 | ||
a4425a57 AM |
2791 | 2020-02-21 Alan Modra <amodra@gmail.com> |
2792 | ||
2793 | * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective | |
2794 | overflow check. | |
2795 | (bfd_mach_o_canonicalize_reloc): Likewise. | |
2796 | (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check | |
2797 | counts and offsets against file size. | |
2798 | (bfd_mach_o_build_dysymtab): Fix ineffective overflow check. | |
2799 | (bfd_mach_o_mangle_sections): Remove unnecessary overflow check. | |
2800 | (bfd_mach_o_read_symtab_symbols): Sanity check count and offset | |
2801 | against file size. Delete symbol table error message. | |
2802 | (bfd_mach_o_read_dysymtab): Sanity check counts and offsets | |
2803 | against file size. | |
2804 | (bfd_mach_o_read_symtab): Likewise. | |
2805 | (bfd_mach_o_read_command): Pass file size. | |
2806 | (bfd_mach_o_scan): Sanity check command count against file size. | |
2807 | ||
dda2980f AM |
2808 | 2020-02-21 Alan Modra <amodra@gmail.com> |
2809 | ||
2810 | PR 25569 | |
2811 | * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use | |
2812 | "text", "data" and "bss" section pointer vars. Don't update | |
2813 | section size, just exec header sizes. | |
2814 | (adjust_sizes_and_vmas): Don't update text section size. Set | |
2815 | initial exec header a_text. Print exec headers sizes. | |
2816 | * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic), | |
2817 | (adjust_sizes_and_vmas): Similarly. Formatting. | |
2818 | (final_link): Correct final file extension. | |
2819 | ||
00e49dff NC |
2820 | 2020-02-20 Nick Clifton <nickc@redhat.com> |
2821 | ||
2822 | * elf-bfd.h (struct elf_backend_data): Add symbol_section_index | |
2823 | callback. | |
2824 | * elfxx-target.h (elf_backend_symbol_section_index): Provide | |
2825 | default definition. | |
2826 | (elfNN_bed): Initialise the symbol_section_index field. | |
2827 | * elf.c (swap_out_syms): Call symbol_section_index, if defined, on | |
2828 | OS and PROC specific section indicies. Warn if converting other | |
2829 | reserved incidies to SHN_ABS. | |
2830 | ||
fcaaac0a SB |
2831 | 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com> |
2832 | ||
2833 | PR 25537 | |
2834 | * cpu-z80.c: Add machine type compatibility checking. | |
2835 | ||
dcf06b89 L |
2836 | 2020-02-19 H.J. Lu <hongjiu.lu@intel.com> |
2837 | ||
2838 | PR binutils/25355 | |
2839 | * plugin.c (plugin_list_entry): Remove handle. | |
2840 | (try_load_plugin): Call dlclose before return. | |
2841 | ||
2c7c5554 AM |
2842 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2843 | ||
2844 | * libbfd-in.h (_bfd_constant_p): Define. | |
2845 | (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against | |
2846 | file size before allocating memory. | |
2847 | * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check. | |
2848 | * elf.c (bfd_elf_get_str_section): Likewise. | |
2849 | (_bfd_elf_slurp_version_tables): Likewise. | |
2850 | * libbfd.h: Regenerate. | |
2851 | ||
2bb3687b AM |
2852 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2853 | ||
2854 | * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New. | |
2855 | * aoutx.h (aout_get_external_symbols): Replace calls to | |
2856 | bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read. | |
2857 | (slurp_reloc_table): Likewise. | |
2858 | * archive.c (do_slurp_bsd_armap): Likewise. | |
2859 | (do_slurp_coff_armap): Likewise. | |
2860 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise. | |
2861 | * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise. | |
2862 | * coff64-rs6000.c (xcoff64_slurp_armap): Likewise. | |
2863 | * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise. | |
2864 | * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section), | |
2865 | (_bfd_coff_get_external_symbols): Likewise. | |
2866 | * ecoff.c (ecoff_slurp_symbolic_header), | |
2867 | (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table), | |
2868 | (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ), | |
2869 | (ecoff_indirect_link_order): Likewise. | |
2870 | * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes), | |
2871 | (_bfd_elf_slurp_version_tables): Likewise. | |
2872 | * elf32-m32c.c (m32c_elf_relax_section): Likewise. | |
2873 | * elf32-rl78.c (rl78_elf_relax_section): Likewise. | |
2874 | * elf32-rx.c (elf32_rx_relax_section): Likewise. | |
2875 | * elf64-alpha.c (READ): Likewise. | |
2876 | * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise. | |
2877 | * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. | |
2878 | * elfcode.h (elf_slurp_symbol_table), | |
2879 | (elf_slurp_reloc_table_from_section): Likewise. | |
2880 | * elflink.c (elf_link_add_object_symbols), | |
2881 | (elf_link_check_versioned_symbol): Likewise. | |
2882 | * elfxx-mips.c (READ): Likewise. | |
2883 | * i386lynx.c (slurp_reloc_table): Likewise. | |
2884 | * lynx-core.c (lynx_core_file_p): Likewise. | |
2885 | * mach-o.c (bfd_mach_o_canonicalize_relocs), | |
2886 | (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read), | |
2887 | (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content | |
2888 | * pdp11.c (aout_get_external_symbols, slurp_reloc_table | |
2889 | * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address), | |
2890 | (bfd_pef_parse_symbols): Likewise. | |
2891 | * peicode.h (pe_ILF_object_p, pe_bfd_object_p | |
2892 | * som.c (setup_sections, som_slurp_string_table), | |
2893 | (som_slurp_reloc_table, som_bfd_count_ar_symbols), | |
2894 | (som_bfd_fill_in_ar_symbols): Likewise. | |
2895 | * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst), | |
2896 | (evax_bfd_print_image): Likewise. | |
2897 | * vms-lib.c (_bfd_vms_lib_archive_p): Likewise. | |
2898 | * wasm-module.c (wasm_scan): Likewise. | |
2899 | * xcofflink.c (xcoff_link_add_symbols): Likewise. | |
2900 | * xsym.c (bfd_sym_read_name_table), | |
2901 | (bfd_sym_print_type_information_table_entry): Likewise. | |
2902 | * libbfd.h: Regenerate. | |
2903 | ||
806470a2 AM |
2904 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2905 | ||
2906 | * aoutx.h (slurp_reloc_table): Allocate reloc_cache after | |
2907 | reading external relocs. | |
2908 | * ecoff.c (ecoff_slurp_reloc_table): Likewise. | |
2909 | * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error | |
2910 | after bfd_bread. | |
2911 | * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary | |
2912 | bfd_release. | |
2913 | * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*. | |
2914 | (m32c_elf_relax_section): Likewise. | |
2915 | * elf32-rl78.c (rl78_offset_for_reloc): Likewise. | |
2916 | (rl78_elf_relax_section): Likewise. | |
2917 | * elf32-rx.c (rx_offset_for_reloc): Likewise. | |
2918 | (elf32_rx_relax_section): Likewise. | |
2919 | * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better | |
2920 | parameter types and use.. | |
2921 | (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib), | |
2922 | (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions. | |
2923 | * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr | |
2924 | being read from file, just the extra. | |
2925 | * som.c (som_slurp_symbol_table): Allocate internal symbol buffer | |
2926 | after reading external syms. Free on failure. | |
2927 | ||
1f4361a7 AM |
2928 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2929 | ||
2930 | * coffcode.h (buy_and_read, coff_slurp_line_table), | |
2931 | (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace | |
2932 | bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the | |
2933 | corresponding bfd_alloc call. Adjust variables to suit. | |
2934 | * coffgen.c (_bfd_coff_get_external_symbols): Likewise. | |
2935 | * ecoff.c (_bfd_ecoff_slurp_symbolic_info), | |
2936 | (_bfd_ecoff_slurp_symbol_table, READ): Likewise. | |
2937 | * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr), | |
2938 | (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise. | |
2939 | * elf32-m32c.c (m32c_elf_relax_section): Likewise. | |
2940 | * elf32-rl78.c (rl78_elf_relax_section): Likewise. | |
2941 | * elf32-rx.c (elf32_rx_relax_section): Likewise. | |
2942 | * elf64-alpha.c (READ): Likewise. | |
2943 | * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr), | |
2944 | (elf_slurp_symbol_table, elf_slurp_reloc_table), | |
2945 | (bfd_from_remote_memory): Likewise. | |
2946 | * elfcore.h (core_find_build_id): Likewise. | |
2947 | * elfxx-mips.c (READ): Likewise. | |
2948 | * mach-o.c (bfd_mach_o_mangle_sections), | |
2949 | (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread), | |
2950 | (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections), | |
2951 | (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise. | |
2952 | * som.c (setup_sections, som_prep_for_fixups) | |
2953 | (som_build_and_write_symbol_table, som_slurp_symbol_table), | |
2954 | (som_slurp_reloc_table, som_bfd_count_ar_symbols), | |
2955 | (som_bfd_fill_in_ar_symbols, som_slurp_armap), | |
2956 | (som_bfd_ar_write_symbol_stuff): Likewise. | |
2957 | * vms-alpha.c (vector_grow1): Likewise. | |
2958 | * vms-lib.c (vms_add_index): Likewise. | |
2959 | * wasm-module.c (wasm_scan_name_function_section): Likewise. | |
2960 | * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete. | |
2961 | * opncls.c (bfd_alloc2, bfd_zalloc2): Delete. | |
2962 | * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2), | |
2963 | (bfd_alloc2, bfd_zalloc2): Delete. | |
2964 | (_bfd_mul_overflow): Define. | |
2965 | * libbfd.h: Regenerate. | |
2966 | ||
446f7ed5 AM |
2967 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2968 | ||
2969 | * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than | |
2970 | bfd_zalloc2. | |
2971 | (assign_section_numbers): Likewise. | |
2972 | (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2. | |
2973 | (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than | |
2974 | bfd_malloc2, size_t amt, and unsigned tls_count. | |
2975 | (rewrite_elf_program_header): Use bfd_malloc and size_t amt. | |
2976 | * elflink.c (elf_create_symbuf): Use bfd_malloc. | |
2977 | (elf_output_implib): Use bfd_alloc. | |
2978 | ||
b03202e3 AM |
2979 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2980 | ||
2981 | * bfd.c (struct bfd): Move format and direction to other | |
2982 | bitfields. Add "size". | |
2983 | * bfdio.c (bfd_get_size): Cache size when not writing file. | |
2984 | * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size | |
2985 | returning zero, ie. unknown. | |
2986 | (bfd_get_alt_debug_link_info): Likewise. | |
2987 | * bfd-in2.h: Regenerate. | |
2988 | ||
7c5fa58e AM |
2989 | 2020-02-19 Alan Modra <amodra@gmail.com> |
2990 | ||
2991 | * coffgen.c (_bfd_coff_get_external_symbols): Don't call | |
2992 | bfd_get_file_size twice. | |
2993 | (_bfd_coff_read_string_table): Allow for bfd_get_file_size | |
2994 | zero, ie. unknown, return. | |
2995 | * elf-attrs.c (_bfd_elf_parse_attributes): Likewise. | |
2996 | * elfcode.h (elf_swap_shdr_in): Likewise. | |
2997 | (elf_object_p): Don't call bfd_get_file_size twice and correct | |
2998 | file size check. | |
2999 | ||
96d3b80f AM |
3000 | 2020-02-19 Alan Modra <amodra@gmail.com> |
3001 | ||
3002 | * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean, | |
3003 | FALSE if memory alloc fails. Adjust calls. | |
3004 | * som.c (som_prep_for_fixups): Likewise. | |
3005 | * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca), | |
3006 | (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr), | |
3007 | (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise. | |
3008 | * som.c (som_build_and_write_symbol_table): Return via error_return | |
3009 | on seek failure. | |
3010 | * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes. | |
3011 | (VEC_APPEND_EL): Delete. | |
3012 | (vector_grow1): Return pointer to element. Catch overflow. | |
3013 | Return NULL on memory allocation failure. | |
3014 | (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND. | |
3015 | (alpha_vms_add_fixup_ca): Likewise. | |
3016 | (alpha_vms_link_add_object_symbols): Check VEC_APPEND result | |
3017 | before using. | |
3018 | * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result. | |
3019 | ||
986f0783 AM |
3020 | 2020-02-19 Alan Modra <amodra@gmail.com> |
3021 | ||
3022 | * aix386-core.c (aix386_core_file_p): Use size_t for "amt". | |
3023 | * aout-target.h (object_p): Likewise. | |
3024 | * aout-tic30.c (tic30_aout_object_p): Likewise. | |
3025 | * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol), | |
3026 | (emit_stringtab, write_syms, link_hash_table_create), | |
3027 | (aout_link_write_other_symbol): Likewise. | |
3028 | * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p), | |
3029 | (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents), | |
3030 | (_bfd_compute_and_write_armap): Likewise. | |
3031 | * archures.c (bfd_arch_list): Likewise. | |
3032 | * bfd.c (bfd_record_phdr): Likewise. | |
3033 | * binary.c (binary_canonicalize_symtab): Likewise. | |
3034 | * cisco-core.c (cisco_core_file_validate): Likewise. | |
3035 | * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue), | |
3036 | (find_arm_glue, record_arm_to_thumb_glue), | |
3037 | (record_thumb_to_arm_glue): Likewise. | |
3038 | * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc), | |
3039 | (ppc_allocate_toc_section): Likewise. | |
3040 | * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise. | |
3041 | * coff-sh.c (sh_relax_section): Likewise. | |
3042 | * coff64-rs6000.c (xcoff64_archive_p): Likewise. | |
3043 | * coffcode.h (handle_COMDAT, coff_new_section_hook), | |
3044 | (coff_set_alignment_hook, coff_mkobject), | |
3045 | (coff_compute_section_file_positions): Likewise. | |
3046 | * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol), | |
3047 | (coff_find_nearest_line_with_names), | |
3048 | ( bfd_coff_set_symbol_class): Likewise. | |
3049 | * cofflink.c (_bfd_coff_link_hash_table_create), | |
3050 | (_bfd_coff_link_input_bfd): Likewise. | |
3051 | * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise. | |
3052 | * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info), | |
3053 | (build_line_info_table, sort_line_sequences), | |
3054 | (line_info_add_include_dir, line_info_add_file_name), | |
3055 | (decode_line_info, scan_unit_for_symbols, parse_comp_unit), | |
3056 | (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise. | |
3057 | * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol), | |
3058 | (_bfd_ecoff_find_nearest_line), | |
3059 | (_bfd_ecoff_bfd_link_hash_table_create): Likewise. | |
3060 | * ecofflink.c (bfd_ecoff_debug_init): Likewise. | |
3061 | * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise. | |
3062 | * elf-m10300.c (mn10300_elf_relax_section), | |
3063 | (elf32_mn10300_link_hash_table_create): Likewise. | |
3064 | * elf-strtab.c (_bfd_elf_strtab_init): Likewise. | |
3065 | * elf.c (make_mapping, copy_elf_program_header): Likewise. | |
3066 | * elf32-arm.c (elf32_arm_link_hash_table_create), | |
3067 | (elf32_arm_setup_section_lists, elf32_arm_check_relocs), | |
3068 | (elf32_arm_new_section_hook): Likewise. | |
3069 | * elf32-avr.c (elf_avr_new_section_hook), | |
3070 | (elf32_avr_link_hash_table_create, get_local_syms), | |
3071 | (elf32_avr_setup_section_lists): Likewise. | |
3072 | * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create), | |
3073 | (bfin_link_hash_table_create): Likewise. | |
3074 | * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. | |
3075 | * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. | |
3076 | * elf32-csky.c (csky_elf_link_hash_table_create), | |
3077 | (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise. | |
3078 | * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise. | |
3079 | * elf32-hppa.c (elf32_hppa_link_hash_table_create), | |
3080 | (elf32_hppa_setup_section_lists, get_local_syms): Likewise. | |
3081 | * elf32-i386.c (elf_i386_check_relocs): Likewise. | |
3082 | * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. | |
3083 | * elf32-m32r.c (m32r_elf_link_hash_table_create), | |
3084 | (m32r_elf_check_relocs): Likewise. | |
3085 | * elf32-m68hc1x.c (m68hc11_elf_hash_table_create), | |
3086 | (elf32_m68hc11_setup_section_lists), | |
3087 | (elf32_m68hc11_size_stubs): Likewise. | |
3088 | * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. | |
3089 | * elf32-metag.c (elf_metag_link_hash_table_create), | |
3090 | (elf_metag_setup_section_lists): Likewise. | |
3091 | * elf32-microblaze.c (microblaze_elf_link_hash_table_create), | |
3092 | (microblaze_elf_check_relocs): Likewise. | |
3093 | * elf32-nds32.c (nds32_elf_link_hash_table_create), | |
3094 | (nds32_elf_check_relocs): Likewise. | |
3095 | * elf32-nios2.c (nios2_elf32_setup_section_lists), | |
3096 | (get_local_syms, nios2_elf32_check_relocs), | |
3097 | (nios2_elf32_link_hash_table_create): Likewise. | |
3098 | * elf32-or1k.c (or1k_elf_link_hash_table_create), | |
3099 | (or1k_elf_check_relocs): Likewise. | |
3100 | * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise. | |
3101 | * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise. | |
3102 | * elf32-s390.c (elf_s390_link_hash_table_create), | |
3103 | (elf_s390_check_relocs): Likewise. | |
3104 | * elf32-score.c (score_elf_create_got_section), | |
3105 | (s3_elf32_score_new_section_hook), | |
3106 | (elf32_score_link_hash_table_create): Likewise. | |
3107 | * elf32-score7.c (score_elf_create_got_section), | |
3108 | (s7_elf32_score_new_section_hook): Likewise. | |
3109 | * elf32-sh.c (sh_elf_link_hash_table_create), | |
3110 | (sh_elf_check_relocs): Likewise. | |
3111 | * elf32-tic6x.c (elf32_tic6x_link_hash_table_create), | |
3112 | (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise. | |
3113 | * elf32-tilepro.c (tilepro_elf_link_hash_table_create), | |
3114 | (tilepro_elf_check_relocs): Likewise. | |
3115 | * elf32-v850.c (remember_hi16s_reloc): Likewise. | |
3116 | * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. | |
3117 | * elf32-xtensa.c (elf_xtensa_link_hash_table_create), | |
3118 | (elf_xtensa_new_section_hook): Likewise. | |
3119 | * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create), | |
3120 | (get_got_entry, elf64_alpha_check_relocs): Likewise. | |
3121 | * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise. | |
3122 | * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise. | |
3123 | * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. | |
3124 | * elf64-ppc.c (ppc64_elf_new_section_hook), | |
3125 | (ppc64_elf_link_hash_table_create, update_local_sym_info), | |
3126 | (update_plt_info, ppc64_elf_check_relocs): Likewise. | |
3127 | * elf64-s390.c (elf_s390_link_hash_table_create), | |
3128 | (elf_s390_check_relocs): Likewise. | |
3129 | * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. | |
3130 | * elflink.c (bfd_elf_link_record_local_dynamic_symbol), | |
3131 | (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols), | |
3132 | (elf_link_add_archive_symbols, compute_bucket_count), | |
3133 | (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create), | |
3134 | (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out), | |
3135 | (bfd_elf_final_link): Likewise. | |
3136 | * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create), | |
3137 | (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs), | |
3138 | (elfNN_aarch64_new_section_hook): Likewise. | |
3139 | * elfnn-ia64.c (elfNN_ia64_object_p): Likewise. | |
3140 | * elfnn-riscv.c (riscv_elf_link_hash_table_create), | |
3141 | (riscv_elf_check_relocs): Likewise. | |
3142 | * elfxx-mips.c (_bfd_mips_elf_new_section_hook), | |
3143 | (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs), | |
3144 | (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents), | |
3145 | (_bfd_mips_elf_link_hash_table_create): Likewise. | |
3146 | * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create), | |
3147 | (_bfd_sparc_elf_check_relocs), | |
3148 | (_bfd_sparc_elf_new_section_hook): Likewise. | |
3149 | * elfxx-tilegx.c (tilegx_elf_link_hash_table_create), | |
3150 | (tilegx_elf_check_relocs): Likewise. | |
3151 | * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. | |
3152 | * format.c (bfd_check_format_matches): Likewise. | |
3153 | * hash.c (_bfd_stringtab_init): Likewise. | |
3154 | * ihex.c (ihex_scan): Likewise. | |
3155 | * irix-core.c (irix_core_core_file_p): Likewise. | |
3156 | * linker.c (bfd_wrapped_link_hash_lookup), | |
3157 | (_bfd_generic_link_hash_table_create), | |
3158 | (_bfd_generic_reloc_link_order): Likewise. | |
3159 | * lynx-core.c (lynx_core_file_p): Likewise. | |
3160 | * netbsd-core.c (netbsd_core_file_p): Likewise. | |
3161 | * osf-core.c (osf_core_core_file_p): Likewise. | |
3162 | * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol), | |
3163 | (link_hash_table_create, aout_link_write_other_symbol): Likewise. | |
3164 | * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise. | |
3165 | * peicode.h (pe_mkobject): Likewise. | |
3166 | * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise. | |
3167 | * ptrace-core.c (ptrace_unix_core_file_p): Likewise. | |
3168 | * sco5-core.c (read_uarea): Likewise. | |
3169 | * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers), | |
3170 | (som_write_fixups, som_write_space_strings, som_write_symbol_strings), | |
3171 | (som_finish_writing, som_canonicalize_symtab, som_new_section_hook), | |
3172 | (som_bfd_copy_private_section_data, bfd_som_set_section_attributes), | |
3173 | (bfd_som_attach_aux_hdr, som_write_armap): Likewise. | |
3174 | * srec.c (srec_scan): Likewise. | |
3175 | * syms.c (_bfd_generic_make_empty_symbol): Likewise. | |
3176 | * targets.c (bfd_target_list): Likewise. | |
3177 | * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise. | |
3178 | * trad-core.c (trad_unix_core_file_p): Likewise. | |
3179 | * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create), | |
3180 | (vms_new_section_hook): Likewise. | |
3181 | * wasm-module.c (wasm_make_empty_symbol): Likewise. | |
3182 | * xcofflink.c (xcoff_get_section_contents), | |
3183 | (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path), | |
3184 | (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym), | |
3185 | (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise. | |
3186 | ||
2d0e1217 AM |
3187 | 2020-02-19 Alan Modra <amodra@gmail.com> |
3188 | ||
3189 | * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99. | |
3190 | ||
99845b3b L |
3191 | 2020-02-13 H.J. Lu <hongjiu.lu@intel.com> |
3192 | ||
3193 | * plugin.c (try_load_plugin): Make plugin_list_iter an argument | |
3194 | and use it if it isn't NULL. Remove has_plugin_p argument. Add | |
3195 | a build_list_p argument. Don't search plugin_list. Short circuit | |
3196 | when building the plugin list. | |
3197 | (has_plugin): Renamed to has_plugin_list. | |
3198 | (bfd_plugin_set_plugin): Don't set has_plugin. | |
3199 | (bfd_plugin_specified_p): Check plugin_list instead. | |
3200 | (build_plugin_list): New function. | |
3201 | (load_plugin): Call build_plugin_list and use plugin_list. | |
3202 | ||
22fe7df8 L |
3203 | 2020-02-11 H.J. Lu <hongjiu.lu@intel.com> |
3204 | ||
3205 | PR binutils/25355 | |
3206 | * plugin.c (try_claim): Always clean up for LTO wrapper. | |
3207 | (try_load_plugin): Treat each object as independent. Create a | |
3208 | copy for plugin name. | |
3209 | ||
c675ec1e NC |
3210 | 2020-02-11 Nick Clifton <nickc@redhat.com> |
3211 | ||
3212 | * elf32-msp430.c (msp430_final_link_relocate): Always use longs | |
3213 | for addresses in print statements. | |
3214 | (msp430_elf_relax_delete_bytes): Likewise. | |
3215 | (msp430_elf_relax_add_words): Likewise. | |
3216 | (msp430_elf_relax_section): Likewise. | |
3217 | ||
1d07a805 L |
3218 | 2020-02-11 H.J. Lu <hongjiu.lu@intel.com> |
3219 | ||
3220 | * plugin.c (add_symbols): Clear plugin_data memory. | |
3221 | ||
0aa99dcd L |
3222 | 2020-02-10 H.J. Lu <hongjiu.lu@intel.com> |
3223 | ||
3224 | PR binutils/25355 | |
3225 | * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE. | |
3226 | (EXECUTABLE_SUFFIX): Likewise. | |
3227 | * config.in: Regenerated. | |
3228 | * configure: Likewise. | |
3229 | * plugin.c (bfd_plugin_close_and_cleanup): Removed. | |
3230 | (plugin_list_entry): Add all_symbols_read, cleanup_handler, | |
3231 | gcc, lto_wrapper, resolution_file, resolution_option, gcc_env, | |
3232 | real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms. | |
3233 | (get_lto_wrapper): New. | |
3234 | (setup_lto_wrapper_env): Likewise. | |
3235 | (current_plugin): Likewise. | |
3236 | (register_all_symbols_read): Likewise. | |
3237 | (register_cleanup): Likewise. | |
3238 | (get_symbols): Likewise. | |
3239 | (add_input_file): Likewise. | |
3240 | (bfd_plugin_close_and_cleanup): Likewise. | |
3241 | (claim_file): Removed. | |
3242 | (register_claim_file): Set current_plugin->claim_file. | |
3243 | (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and | |
3244 | lto_syms in current_plugin. | |
3245 | (try_claim): Use current_plugin->claim_file. Call LTO plugin | |
3246 | all_symbols_read handler. Copy real symbols to plugin_data. | |
3247 | Call LTO plugin cleanup handler. Clean up for LTO wrapper. | |
3248 | (try_load_plugin): Don't reuse the previous plugin for LTO | |
3249 | wrapper. Set up GCC LTO wrapper if possible. Don't set | |
3250 | plugin_list_iter->claim_file. | |
3251 | (bfd_plugin_canonicalize_symtab): Use real LTO symbols if | |
3252 | possible. | |
3253 | * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and | |
3254 | real_syms. | |
3255 | ||
ac4280da JL |
3256 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
3257 | ||
3258 | * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch, | |
3259 | check if previous instruction matches a conditional jump inserted | |
3260 | earlier. Invert conditional jump and delete branch in this case. | |
3261 | ||
8d6cb116 JL |
3262 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
3263 | ||
3264 | * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to | |
3265 | msp430_elf_relax_add_words. Support insertion of either one or two | |
3266 | words. | |
3267 | (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation | |
3268 | needs to be grown. Handle insertion of branch instruction to replace | |
3269 | jump. | |
3270 | ||
d60f5448 JL |
3271 | 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com> |
3272 | ||
3273 | * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for | |
3274 | debugging relocations. | |
3275 | (msp430_elf_relax_delete_bytes): Likewise. | |
3276 | (msp430_elf_relax_add_two_words): Likewise. | |
3277 | (msp430_elf_relax_section): Likewise. | |
3278 | ||
e1f85e11 AM |
3279 | 2020-02-10 Alan Modra <amodra@gmail.com> |
3280 | ||
3281 | * archures.c: Wrap overlong z80 comments. | |
3282 | * bfd-in2.h: Regenerate. | |
3283 | ||
9fc0b501 SB |
3284 | 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com> |
3285 | ||
3286 | PR 25469 | |
3287 | * archures.c: Add GBZ80 and Z80N machine values. | |
3288 | * reloc.c: Add BFD_RELOC_Z80_16_BE. | |
3289 | * coff-z80.c: Add support for new reloc. | |
3290 | * coffcode.h: Add support for new machine values. | |
3291 | * cpu-z80.c: Add support for new machine names. | |
3292 | * elf32-z80.c: Add support for new reloc. | |
3293 | * bfd-in2.h: Regenerate. | |
3294 | * libbfd.h: Regenerate. | |
3295 | ||
9984857c NC |
3296 | 2020-02-07 Nick Clifton <nickc@redhat.com> |
3297 | ||
3298 | PR 23932 | |
3299 | * elf.c (rewrite_elf_program_header): Do not complain if no | |
3300 | sections are mapped to a segment. | |
3301 | ||
5242a0a0 L |
3302 | 2020-02-06 H.J. Lu <hongjiu.lu@intel.com> |
3303 | ||
3304 | PR ld/25490 | |
3305 | * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error | |
3306 | for garbage collection on __patchable_function_entries section | |
3307 | without linked-to section. | |
3308 | ||
b7d07216 L |
3309 | 2020-02-06 H.J. Lu <hongjiu.lu@intel.com> |
3310 | ||
3311 | PR gas/25381 | |
3312 | * bfd-in2.h: Regenerated. | |
3313 | * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook | |
3314 | on section if gc_mark of any of its linked-to sections is set | |
3315 | and don't set gc_mark again. | |
3316 | * section.c (asection): Add linked_to_symbol_name to map_head | |
3317 | union. | |
3318 | ||
b93a662b MR |
3319 | 2020-02-06 Maciej W. Rozycki <macro@wdc.com> |
3320 | ||
3321 | * elf32-v850.c (v850_elf_relax_section): Fix the index used for | |
3322 | reporting an unrecognized instruction with R_V850_LONGJUMP. | |
3323 | ||
6df4c9c2 AM |
3324 | 2020-02-05 Alan Modra <amodra@gmail.com> |
3325 | ||
3326 | * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality. | |
3327 | ||
24872cb3 AM |
3328 | 2020-02-04 Alan Modra <amodra@gmail.com> |
3329 | ||
3330 | * elf32-ppc.c (ppc_elf_relocate_section): After applying | |
3331 | R_PPC_VLE_ADDR20, goto copy_reloc. | |
3332 | ||
ef4627fa L |
3333 | 2020-02-02 H.J. Lu <hongjiu.lu@intel.com> |
3334 | ||
3335 | * bfd-in2.h: Regenerated. | |
3336 | * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments. | |
3337 | ||
a8c4d40b L |
3338 | 2020-02-02 H.J. Lu <hongjiu.lu@intel.com> |
3339 | ||
3340 | PR gas/25380 | |
3341 | * bfd-in2.h: Regenerated. | |
3342 | * ecoff.c (bfd_debug_section): Add section_id. | |
3343 | * section.c (bfd_section): Add section_id. | |
3344 | (SEC_ASSEMBLER_SECTION_ID): New. | |
3345 | (BFD_FAKE_SECTION): Add section_id. | |
3346 | ||
5a9212a1 NC |
3347 | 2020-02-01 Nick Clifton <nickc@redhat.com> |
3348 | ||
3349 | * config.bfd: Move the c30-aout and tic30-aout targets onto the | |
3350 | obsolete list. | |
3351 | ||
e7cbe0c4 SL |
3352 | 2020-01-31 Sandra Loosemore <sandra@codesourcery.com> |
3353 | ||
3354 | * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel | |
3355 | encodings are relative to the GOT on nios2, too. | |
3356 | ||
72ebe8c5 AM |
3357 | 2020-01-31 Alan Modra <amodra@gmail.com> |
3358 | ||
3359 | * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp | |
3360 | file. Use $< and $@ in rules. | |
3361 | (elf32-aarch64.c, elf64-aarch64.c): Likewise. | |
3362 | (elf32-ia64.c, elf64-ia64.c): Likewise. | |
3363 | (elf32-riscv.c, elf64-riscv.c): Likewise. | |
3364 | (peigen.c, pepigen.c, pex64igen.c): Likewise. | |
3365 | (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line. | |
3366 | (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED). | |
3367 | (elf32-ia64.c, elf64-ia64.c): Do emit #line. | |
3368 | (peigen.c, pepigen.c, pex64igen.c): Likewise. | |
3369 | * Makefile.in: Regenerate. | |
3370 | ||
327301a4 AM |
3371 | 2020-01-31 Alan Modra <amodra@gmail.com> |
3372 | ||
3373 | PR 4110 | |
3374 | * elf.c (setup_group): Don't clear entire section contents, | |
3375 | just the padding after group flags. Release alloc'd memory | |
3376 | after a seek or read failure. | |
3377 | ||
b5d36aaa JT |
3378 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
3379 | ||
3380 | * peXXigen.c (pe_is_repro): New function. | |
3381 | (_bfd_XX_print_private_bfd_data_common): Note timestamp is | |
3382 | actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present. | |
3383 | ||
1957ab10 JT |
3384 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
3385 | ||
3386 | * peXXigen.c (debug_type_names): Add names for new debug data type | |
3387 | values. | |
3388 | ||
87b2920f JT |
3389 | 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk> |
3390 | ||
3391 | * peXXigen.c (pe_print_debugdata): Fix the iteration variable for | |
3392 | inner loop. Fix a memory leak. | |
3393 | ||
72913831 AM |
3394 | 2020-01-30 Alan Modra <amodra@gmail.com> |
3395 | ||
3396 | * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms | |
3397 | or obj_coff_keep_strings here. | |
3398 | (coff_get_normalized_symtab): Free external syms directly. | |
3399 | * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms | |
3400 | on error exit path. | |
3401 | ||
c35d018b JW |
3402 | 2020-01-27 Jim Wilson <jimw@sifive.com> |
3403 | ||
3404 | * cpu-riscv.c (riscv_scan): New. | |
3405 | (N): Change bfd_default_scan to riscv_scan. | |
3406 | ||
086b06f3 AS |
3407 | 2020-01-27 Andreas Schwab <schwab@suse.de> |
3408 | ||
3409 | * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo. | |
3410 | (ALL_MACHINES_CFILES): Remove cpu-plugin.c. | |
3411 | * Makefile.in: Regenerate. | |
3412 | * cpu-plugin.c: Remove. | |
3413 | * archures.c (enum bfd_architecture): Remove bfd_arch_plugin. | |
3414 | (bfd_plugin_arch): Remove declaration. | |
3415 | * bfd-in2.h: Regenerate. | |
3416 | * po/SRC-POTFILES.in: Regenerate. | |
3417 | ||
3024a17a AM |
3418 | 2020-01-27 H.J. Lu <hongjiu.lu@intel.com> |
3419 | Alan Modra <amodra@gmail.com> | |
3420 | ||
3421 | PR ld/25458 | |
3422 | * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases. | |
3423 | ||
b5f998b2 JW |
3424 | 2020-01-24 Jim Wilson <jimw@sifive.com> |
3425 | ||
3426 | * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others. | |
3427 | (riscv_parse_prefixed_ext): Fix s extension comment and reword to | |
3428 | avoid over long line. | |
3429 | ||
caa31cfa NC |
3430 | 2020-01-24 Nick Clifton <nickc@redhat.com> |
3431 | ||
3432 | PR 25447 | |
3433 | * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep | |
3434 | syms and keep strings flags as these may have been set in order to | |
3435 | prevent a bogus call to free. | |
3436 | ||
24e648d4 NC |
3437 | 2020-01-23 Nick Clifton <nickc@redhat.com> |
3438 | ||
3439 | * po/fr.po: Updated French translation. | |
3440 | ||
67641dd3 AM |
3441 | 2020-01-23 Alan Modra <amodra@gmail.com> |
3442 | ||
3443 | PR 25444 | |
3444 | * elf.c (assign_file_positions_for_load_sections): Avoid divide | |
3445 | by zero when p_align is zero. | |
3446 | ||
403d1bd9 JW |
3447 | 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com> |
3448 | ||
3449 | * bfd/elfnn-riscv.c (riscv_skip_prefix): New. | |
3450 | (riscv_prefix_cmp): Likewise. | |
3451 | (riscv_non_std_ext_p): Deleted. | |
3452 | (riscv_std_sv_ext_p): Likewise. | |
3453 | (riscv_non_std_sv_ext_p): Likewise. | |
3454 | (riscv_merge_non_std_and_sv_ext): Rename to... | |
3455 | (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp. | |
3456 | (riscv_merge_arch_attr_info): Replace 3 calls to | |
3457 | riscv_merge_non_std_and_sv_ext with single call to | |
3458 | riscv_merge_multi_letter_ext. | |
3459 | * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we | |
3460 | encounter a 'z' prefix. | |
3461 | (riscv_get_prefix_class): New function, return prefix class based | |
3462 | on first few characters of input string. | |
3463 | (riscv_parse_config): New structure to factor out minor differences | |
3464 | in extension class parsing behaviour. | |
3465 | (riscv_parse_sv_or_non_std_ext): Rename to... | |
3466 | (riscv_parse_prefixed_ext): and parameterise with | |
3467 | riscv_parse_config. | |
3468 | (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New. | |
3469 | (riscv_multi_letter_ext_valid_p): New. | |
3470 | (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New. | |
3471 | (riscv_parse_subset): Delegate all non-single-letter parsing work | |
3472 | to riscv_parse_prefixed_ext. | |
3473 | * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type. | |
3474 | (riscv_get_prefix_class): Declare. | |
3475 | ||
a804e476 AM |
3476 | 2020-01-22 Alan Modra <amodra@gmail.com> |
3477 | ||
3478 | * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group. | |
3479 | (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for | |
3480 | __tls_get_addr_desc. | |
3481 | (ppc64_elf_size_stubs): Add section for linker generated | |
3482 | __tls_get_addr_desc wrapper function. Loop at least once if | |
3483 | generating this function. | |
3484 | (emit_tga_desc, emit_tga_desc_eh_frame): New functions. | |
3485 | (ppc64_elf_build_stubs): Generate __tls_get_addr_desc. | |
3486 | ||
9e7028aa AM |
3487 | 2020-01-22 Alan Modra <amodra@gmail.com> |
3488 | ||
3489 | * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave. | |
3490 | * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and | |
3491 | tga_desc_fd. | |
3492 | (is_tls_get_addr): Match tga_desc and tga_desc_df too. | |
3493 | (STDU_R1_0R1, ADDI_R1_R1): Define. | |
3494 | (tls_get_addr_prologue, tls_get_addr_epilogue): New functions. | |
3495 | (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect | |
3496 | tga_desc_fd to opt_fd, and tga_desc to opt. Set | |
3497 | no_tls_get_addr_regsave. | |
3498 | (branch_reloc_hash_match): Add hash3 and hash4. | |
3499 | (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too. | |
3500 | (ppc64_elf_size_dynamic_sections): Likewise. | |
3501 | (ppc64_elf_relocate_section): Likewise. | |
3502 | (plt_stub_size, build_plt_stub): Likewise. Size regsave | |
3503 | __tls_get_addr stub. | |
3504 | (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and | |
3505 | eh_frame. | |
3506 | (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size | |
3507 | eh_frame for regsave __tls_get_addr. | |
3508 | ||
abc489c6 AM |
3509 | 2020-01-22 Alan Modra <amodra@gmail.com> |
3510 | ||
3511 | * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under | |
3512 | which __tls_get_addr calls will be eliminated. | |
3513 | ||
26916852 NC |
3514 | 2020-01-20 Nick Clifton <nickc@redhat.com> |
3515 | ||
3516 | * po/pt.po: Updates Portuguese translation. | |
3517 | * po/ru.po: Updated Russian translation. | |
3518 | * po/uk.po: Updated Ukranian translation. | |
3519 | ||
14470f07 L |
3520 | 2020-01-20 H.J. Lu <hongjiu.lu@intel.com> |
3521 | ||
3522 | PR ld/25416 | |
3523 | * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support | |
3524 | "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in | |
3525 | X32 mode. | |
3526 | (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE | |
3527 | transition, relax "rex leal x@tlsdesc(%rip), %reg" to | |
3528 | "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax | |
3529 | "rex leal x@tlsdesc(%rip), %reg" to | |
3530 | "rex movl x@gottpoff(%rip), %eax". For both transitions, relax | |
3531 | "call *(%eax)" to "nopl (%rax)". | |
3532 | ||
b9ca1af6 AM |
3533 | 2020-01-20 Alan Modra <amodra@gmail.com> |
3534 | ||
3535 | * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1), | |
3536 | (MTLR_R11): Don't define. | |
3537 | (LD_R0_0R3, CMPDI_R0_0): Define. | |
3538 | (build_tls_get_addr_stub): Don't use r11 in stub. | |
3539 | ||
ed7007c1 AM |
3540 | 2020-01-20 Alan Modra <amodra@gmail.com> |
3541 | ||
3542 | * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file. | |
3543 | (defined_sym_val, is_tls_get_addr): Likewise. | |
3544 | ||
1b1bb2c6 NC |
3545 | 2020-01-18 Nick Clifton <nickc@redhat.com> |
3546 | ||
3547 | * version.m4 (BFD_VERSION): Set to 2.34.50. | |
3548 | * configure: Regenerate. | |
3549 | * po/bfd.pot: Regenerate. | |
3550 | ||
ae774686 NC |
3551 | 2020-01-18 Nick Clifton <nickc@redhat.com> |
3552 | ||
3553 | Binutils 2.34 branch created. | |
3554 | ||
07f1f3aa CB |
3555 | 2020-01-17 Christian Biesinger <cbiesinger@google.com> |
3556 | ||
3557 | * coff-arm.c: Fix spelling error (seperate). | |
3558 | * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling | |
3559 | error (seperate). | |
3560 | * sysdep.h (strnlen): Fix spelling error (seperate). | |
3561 | ||
0d1cc75d LB |
3562 | 2020-01-15 Lars Brinkhoff <lars@nocrew.org> |
3563 | ||
3564 | PR 20694 | |
3565 | * pdp11.c (TARGET_PAGE_SIZE): Set to 8192. | |
3566 | ||
e1c6cf61 AM |
3567 | 2020-01-15 Alan Modra <amodra@gmail.com> |
3568 | ||
3569 | PR 25384 | |
3570 | * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. | |
3571 | (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies | |
3572 | of function symbols unless dot symbols are present. Do warn | |
3573 | whenever one is created, regardles of whether a PLT entry is | |
3574 | also emitted for the function symbol. | |
3575 | ||
ef4e5ba5 AM |
3576 | 2020-01-14 Alan Modra <amodra@gmail.com> |
3577 | ||
3578 | * som.c (som_bfd_count_ar_symbols): Error when file position | |
3579 | of symbols on chains is not strictly increasing. | |
3580 | ||
8ab484c2 AM |
3581 | 2020-01-14 Alan Modra <amodra@gmail.com> |
3582 | ||
3583 | * vms.h (VMS_DEBUG): Define as 0. | |
3584 | * vms-alpha.c (image_write): Move debug output after bounds check. | |
3585 | Tidy bounds check. | |
3586 | (_bfd_vms_slurp_eihd): Warning fix. | |
3587 | (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings. | |
3588 | ||
b50ef514 AM |
3589 | 2020-01-13 Alan Modra <amodra@gmail.com> |
3590 | ||
3591 | * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even | |
3592 | for "ignored" records. | |
3593 | ||
0c0adcc5 AM |
3594 | 2020-01-13 Alan Modra <amodra@gmail.com> |
3595 | ||
3596 | * wasm-module.c (wasm_scan_name_function_section): Formatting. | |
3597 | Delete asect name check. Move asect NULL check to wasm_object_p. | |
3598 | Correct bounds check of sizes against end. Replace uses of | |
3599 | bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use | |
3600 | just one bfd_release. | |
3601 | (wasm_scan): Don't use malloc/strdup for section names, | |
3602 | bfd_alloc instead. Simplify code prefixing section name. | |
3603 | Formatting. Don't attempt to free memory here.. | |
3604 | (wasm_object_p): ..do so here. | |
3605 | ||
7f026732 SN |
3606 | 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com> |
3607 | ||
3608 | PR ld/22269 | |
3609 | * elf32-arm.c (elf32_arm_final_link_relocate): Use | |
3610 | UNDEFWEAK_NO_DYNAMIC_RELOC. | |
3611 | (allocate_dynrelocs_for_symbol): Likewise. | |
3612 | ||
8cd0e5e9 TC |
3613 | 2020-01-10 Tamar Christina <tamar.christina@arm.com> |
3614 | ||
3615 | PR 25210 | |
3616 | * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass. | |
3617 | ||
71780f45 AM |
3618 | 2020-01-10 Alan Modra <amodra@gmail.com> |
3619 | ||
3620 | * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type. | |
3621 | ||
b899eb3b NC |
3622 | 2020-01-09 Nick Clifton <nickc@redhat.com> |
3623 | ||
3624 | PR 25221 | |
3625 | * bfd.c (bfd_convert_section_contents): Check for a compress | |
3626 | header size that is larger than the actual section size. | |
3627 | ||
4c6ee646 AM |
3628 | 2020-01-08 Alan Modra <amodra@gmail.com> |
3629 | ||
3630 | PR 25351 | |
3631 | * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms | |
3632 | after removing sections. | |
3633 | ||
85f78364 JW |
3634 | 2020-01-06 Jim Wilson <jimw@sifive.com> |
3635 | ||
3636 | PR 25205 | |
3637 | * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add | |
3638 | check for !bfd_link_pic (info). | |
3639 | <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL. | |
3640 | <R_RISCV_JAL>: Add comment. | |
3641 | (_bfd_riscv_relax_section): For plt.offset check, add check for | |
3642 | bfd_link_pic (info). Add comment. | |
3643 | ||
49078ece AM |
3644 | 2020-01-06 Alan Modra <amodra@gmail.com> |
3645 | ||
3646 | * format.c (bfd_check_format_matches): Ignore bfd_error on target | |
3647 | match failures. Don't init to bfd_error_wrong_format before | |
3648 | calling _bfd_check_format. | |
3649 | ||
ab356be7 AM |
3650 | 2020-01-06 Alan Modra <amodra@gmail.com> |
3651 | ||
3652 | * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail | |
3653 | status rather than exiting on stack overflow or underflow. | |
3654 | (_bfd_vms_slurp_etir): Adjust to suit. | |
3655 | ||
85d86817 AM |
3656 | 2020-01-06 Alan Modra <amodra@gmail.com> |
3657 | ||
3658 | * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index. | |
3659 | ||
3e6aa775 AM |
3660 | 2020-01-06 Alan Modra <amodra@gmail.com> |
3661 | ||
3662 | * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of | |
3663 | command. Check name offset is within command. | |
3664 | (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib), | |
3665 | (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints), | |
3666 | (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab), | |
3667 | (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid), | |
3668 | (bfd_mach_o_read_linkedit, bfd_mach_o_read_str), | |
3669 | (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min), | |
3670 | (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version), | |
3671 | (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main), | |
3672 | (bfd_mach_o_read_note, bfd_mach_o_read_build_version), | |
3673 | (bfd_mach_o_read_segment): Similarly. | |
3674 | (bfd_mach_o_read_thread): Properly bound check thread struct. | |
3675 | Don't repeat checks on second loop. | |
3676 | (bfd_mach_o_read_command): Fail on invalid command length. | |
3677 | ||
ea933f17 AM |
3678 | 2020-01-04 Alan Modra <amodra@gmail.com> |
3679 | ||
3680 | * format.c (bfd_check_format_matches): Add preserve_match. | |
3681 | Save initial bfd state in "preserve", matched bfd state in | |
3682 | "preserve_match". Save just the first match. Release | |
3683 | bfd_alloc memory. Restore and finish preserved state as | |
3684 | appropriate on all function exit paths. | |
3685 | ||
f24bdec4 AM |
3686 | 2020-01-04 Alan Modra <amodra@gmail.com> |
3687 | ||
3688 | * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc. | |
3689 | ||
991fb595 AM |
3690 | 2020-01-04 Alan Modra <amodra@gmail.com> |
3691 | ||
3692 | * coffgen.c (coff_real_object_p): Free malloc'd memory on target | |
3693 | match too. | |
3694 | ||
f2a3559d NC |
3695 | 2020-01-03 Nick Clifton <nickc@redhat.com> |
3696 | ||
3697 | PR 25307 | |
3698 | (bfd_pef_parse_function_stubs): Correct the test that ensures that | |
3699 | there is enough data remaining in the code buffer before | |
3700 | attempting to read a function stub. | |
3701 | ||
7a0fb7be NC |
3702 | 2020-01-03 Nick Clifton <nickc@redhat.com> |
3703 | ||
3704 | PR 25308 | |
3705 | * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the | |
3706 | return value from bfd_malloc. | |
3707 | * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. | |
3708 | (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. | |
3709 | (elf32_arm_filter_cmse_symbols): Likewise. | |
3710 | (elf32_arm_write_section): Likewise. | |
3711 | * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. | |
3712 | (bfd_mach_o_follow_dsym): Likewise. | |
3713 | * pef.c (bfd_pef_print_loader_section): Likewise. | |
3714 | (bfd_pef_scan_start_address): Likewise. | |
3715 | (bfd_pef_parse_function_stubs): Likewise. | |
3716 | (bfd_pef_parse_symbols): Likewise. | |
3717 | ||
b26a3d58 ST |
3718 | 2020-01-03 Sergei Trofimovich <siarheit@google.com> |
3719 | ||
3720 | * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail | |
3721 | on binary inputs ld/PR25316. | |
3722 | (is_ia64_elf): new helper to filter on ia64 objects. | |
3723 | ||
4bb7a87e JB |
3724 | 2020-01-03 Jan Beulich <jbeulich@suse.com> |
3725 | ||
3726 | * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore | |
3727 | in parameter names. | |
3728 | (bfd_mach_o_scan): Insert underscore in two variable names. | |
3729 | ||
6655dba2 SB |
3730 | 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com> |
3731 | ||
3732 | * Makefile.am: Add z80-elf target support. | |
3733 | * configure.ac: Likewise. | |
3734 | * targets.c: Likewise. | |
3735 | * Makefile.in: Regenerate. | |
3736 | * configure: Regenerate. | |
3737 | * config.bfd: Add z80-elf target support and new arches: ez80 and | |
3738 | z180. | |
3739 | * elf32-z80.c: New file. | |
3740 | * archures.c: Add new z80 architectures: eZ80 and Z180. | |
3741 | * coffcode.h: Likewise. | |
3742 | * cpu-z80.c: Likewise. | |
3743 | * coff-z80.c: Add new relocations for Z80 target and local label | |
3744 | check. | |
3745 | * reloc.c: Add new relocs. | |
3746 | * bfd-in2.h: Regenerate. | |
3747 | * libbfd.h: Regenerate. | |
3748 | ||
0db131fb TC |
3749 | 2020-01-02 Tamar Christina <tamar.christina@arm.com> |
3750 | ||
3751 | PR 25210 | |
3752 | PR 24753 | |
3753 | * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. | |
3754 | ||
b14ce8bf AM |
3755 | 2020-01-01 Alan Modra <amodra@gmail.com> |
3756 | ||
3757 | Update year range in copyright notice of all files. | |
3758 | ||
0b114740 | 3759 | For older changes see ChangeLog-2019 |
3499769a | 3760 | \f |
0b114740 | 3761 | Copyright (C) 2020 Free Software Foundation, Inc. |
3499769a AM |
3762 | |
3763 | Copying and distribution of this file, with or without modification, | |
3764 | are permitted in any medium without royalty provided the copyright | |
3765 | notice and this notice are preserved. | |
3766 | ||
3767 | Local Variables: | |
3768 | mode: change-log | |
3769 | left-margin: 8 | |
3770 | fill-column: 74 | |
3771 | version-control: never | |
3772 | End: |