Remove w65 support
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
a9a4b302
AM
12018-04-16 Alan Modra <amodra@gmail.com>
2
3 * Makefile.am: Remove w65 support.
4 * archures.c: Likewise.
5 * coffcode.h: Likewise.
6 * config.bfd: Likewise.
7 * configure.ac: Likewise.
8 * targets.c: Likewise.
9 * coff-w65.c: Delete.
10 * cpu-w65.c: Delete.
11 * Makefile.in: Regenerate.
12 * bfd-in2.h: Regenerate.
13 * configure: Regenerate.
14 * po/SRC-POTFILES.in: Regenerate.
15
04cb01fd
AM
162018-04-16 Alan Modra <amodra@gmail.com>
17
18 * Makefile.am: Remove we32k support.
19 * archures.c: Likewise.
20 * coffcode.h: Likewise.
21 * config.bfd: Likewise.
22 * configure.ac: Likewise.
23 * targets.c: Likewise.
24 * coff-we32k.c: Delete.
25 * cpu-we32k.c: Delete.
26 * Makefile.in: Regenerate.
27 * bfd-in2.h: Regenerate.
28 * configure: Regenerate.
29 * po/SRC-POTFILES.in: Regenerate.
30
c2bf1eec
AM
312018-04-16 Alan Modra <amodra@gmail.com>
32
33 * Makefile.am: Remove m88k support.
34 * aoutx.h: Likewise.
35 * archures.c: Likewise.
36 * coffcode.h: Likewise.
37 * coffswap.h: Likewise.
38 * config.bfd: Likewise.
39 * configure.ac: Likewise.
40 * cpu-ns32k.c: Likewise.
41 * elf32-nds32.c: Likewise.
42 * mach-o.c: Likewise.
43 * netbsd-core.c: Likewise.
44 * reloc.c: Likewise.
45 * targets.c: Likewise.
46 * coff-m88k.c: Delete.
47 * cpu-m88k.c: Delete.
48 * elf32-m88k.c: Delete.
49 * hosts/m88kmach3.h: Delete.
50 * m88kmach3.c: Delete.
51 * m88kopenbsd.c: Delete.
52 * Makefile.in: Regenerate.
53 * bfd-in2.h: Regenerate.
54 * configure: Regenerate.
55 * po/SRC-POTFILES.in: Regenerate.
56
6793974d
AM
572018-04-16 Alan Modra <amodra@gmail.com>
58
59 * Makefile.am: Remove i370 support.
60 * archures.c: Likewise.
61 * config.bfd: Likewise.
62 * configure.ac: Likewise.
63 * targets.c: Likewise.
64 * cpu-i370.c: Delete.
65 * elf32-i370.c: Delete.
66 * Makefile.in: Regenerate.
67 * bfd-in2.h: Regenerate.
68 * configure: Regenerate.
69 * po/SRC-POTFILES.in: Regenerate.
70
e82aa794
AM
712018-04-16 Alan Modra <amodra@gmail.com>
72
73 * Makefile.am: Remove h8500 support.
74 * archures.c: Likewise.
75 * coffcode.h: Likewise.
76 * config.bfd: Likewise.
77 * configure.ac: Likewise.
78 * targets.c: Likewise.
79 * coff-h8500.c: Delete.
80 * cpu-h8500.c: Delete.
81 * Makefile.in: Regenerate.
82 * bfd-in2.h: Regenerate.
83 * configure: Regenerate.
84 * po/SRC-POTFILES.in: Regenerate.
85
fe0bf0fd
AM
862018-04-16 Alan Modra <amodra@gmail.com>
87
88 * Makefile.am: Remove h8300-coff support.
89 * coffcode.h: Likewise.
90 * config.bfd: Likewise.
91 * configure.ac: Likewise.
92 * reloc16.c: Likewise.
93 * targets.c: Likewise.
94 * coff-h8300.c: Delete.
95 * Makefile.in: Regenerate.
96 * configure: Regenerate.
97 * po/SRC-POTFILES.in: Regenerate.
98
fdef3943
AM
992018-04-16 Alan Modra <amodra@gmail.com>
100
101 * Makefile.am: Remove IEEE 695 support.
102 * archures.c: Likewise.
103 * bfd.c: Likewise.
104 * config.bfd: Likewise.
105 * configure.ac: Likewise.
106 * doc/bfd.texinfo: Likewise.
107 * doc/bfdint.texi: Likewise.
108 * doc/bfdsumm.texi: Likewise.
109 * section.c: Likewise.
110 * targets.c: Likewise.
111 * ieee.c: Delete.
112 * libieee.h: Delete.
113 * Makefile.in: Regenerate.
114 * bfd-in2.h: Regenerate.
115 * configure: Regenerate.
116 * po/SRC-POTFILES.in: Regenerate.
117
de96689e
AM
1182018-04-16 Alan Modra <amodra@gmail.com>
119
120 * config.bfd: Remove tandem support.
121
5972ac73
AM
1222018-04-16 Alan Modra <amodra@gmail.com>
123
124 * Makefile.am: Remove newsos3 support.
125 * aoutx.h: Likewise.
126 * config.bfd: Likewise.
127 * configure.ac: Likewise.
128 * targets.c: Likewise.
129 * newsos3.c: Delete.
130 * Makefile.in: Regenerate.
131 * configure: Regenerate.
132 * po/SRC-POTFILES.in: Regenerate.
133
b4b594e3
AM
1342018-04-16 Alan Modra <amodra@gmail.com>
135
136 * Makefile.am: Remove netware support.
137 * bfd-in.h: Likewise.
138 * bfd.c: Likewise.
139 * config.bfd: Likewise.
140 * configure.ac: Likewise.
141 * doc/bfdint.texi: Likewise.
142 * ecoff.c: Likewise.
143 * targets.c: Likewise.
144 * libnlm.h: Delete.
145 * nlm-target.h: Delete.
146 * nlm.c: Delete.
147 * nlm32-alpha.c: Delete.
148 * nlm32-i386.c: Delete.
149 * nlm32-ppc.c: Delete.
150 * nlm32-sparc.c: Delete.
151 * nlm32.c: Delete.
152 * nlm64.c: Delete.
153 * nlmcode.h: Delete.
154 * nlmswap.h: Delete.
155 * Makefile.in: Regenerate.
156 * bfd-in2.h: Regenerate.
157 * configure: Regenerate.
158 * po/SRC-POTFILES.in: Regenerate.
159
fceadf09
AM
1602018-04-16 Alan Modra <amodra@gmail.com>
161
162 * archures.c: Remove tahoe support.
163 * config.bfd: Likewise.
164 * configure.ac: Likewise.
165 * hosts/tahoe.h: Delete.
166 * bfd-in2.h: Regenerate.
167 * configure: Regenerate.
168
702d1671
AM
1692018-04-14 Alan Modra <amodra@gmail.com>
170
171 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
172 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
173 sanity test.
174 (elfNN_bed): Init relropagesize.
175 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
176 select relropagesize.
177 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
178 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
179 (ELF_MINPAGESIZE): Don't define.
180 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
181 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
182 * bfd-in2.h: Regenerate.
183
03aa9684
AM
1842018-04-14 Alan Modra <amodra@gmail.com>
185
186 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
187 on __QNXTARGET__ define.
188
24acfe5e
AM
1892018-04-14 Alan Modra <amodra@gmail.com>
190
191 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
192 to obsolete list.
193
a8eb42a8
AM
1942018-04-11 Alan Modra <amodra@gmail.com>
195
196 * aout-adobe.c: Delete.
197 * bout.c: Delete.
198 * coff-i860.c: Delete.
199 * coff-i960.c: Delete.
200 * cpu-i860.c: Delete.
201 * cpu-i960.c: Delete.
202 * elf32-i860.c: Delete.
203 * elf32-i960.c: Delete.
204 * hosts/i860mach3.h: Delete.
205 * Makefile.am: Remove i860, i960, bout, and adobe support.
206 * archures.c: Remove i860 and i960 support.
207 * coffcode.h: Likewise.
208 * reloc.c: Likewise.
209 * aoutx.h: Comment updates.
210 * archive.c: Remove BOUT and i960 support.
211 * bfd.c: Remove BOUT support.
212 * coffswap.h: Remove i960 support.
213 * config.bfd: Remove i860, i960 and adobe targets.
214 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
215 * targets.c: Likewise.
216 * ieee.c: Remove i960 support.
217 * mach-o.c: Remove i860 support.
218 * Makefile.in: Regenerate.
219 * bfd-in2.h: Regenerate.
220 * configure: Regenerate.
221 * libbfd.h: Regenerate.
222 * po/SRC-POTFILES.in: Regenerate.
223
aec2e0d2
MR
2242018-04-09 Maciej W. Rozycki <macro@mips.com>
225
226 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
227 in the BFD symbol referred by the relocation.
228 (mips_elf64_write_rela): Likewise.
229
9ccfa98b
MR
2302018-04-09 Maciej W. Rozycki <macro@mips.com>
231
232 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
233 error for out-of-range `r_sym' values.
234
3e04d765
AM
2352018-04-09 Alan Modra <amodra@gmail.com>
236
237 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
238 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
239 (ppc64_elf_check_relocs): Set has_pltcall.
240 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
241 (ppc64_elf_inline_plt): New function.
242 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
243 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
244 * elf32-ppc.c (has_pltcall): Define.
245 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
246 (ppc_elf_check_relocs): Set has_pltcall.
247 (ppc_elf_inline_plt): New function.
248 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
249 (ppc_elf_size_dynamic_sections): Likewise.
250 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
251
23cedd1d
AM
2522018-04-09 Alan Modra <amodra@gmail.com>
253
254 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
255 (is_plt_seq_reloc): New function.
256 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
257 (ppc_elf_tls_optimize): Handle inline plt call sequence.
258 (ppc_elf_relax_section): Handle PLTCALL reloc.
259 (ppc_elf_relocate_section): Nop out inline plt call sequence when
260 resolving locally.
261 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
262 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
263 (has_tls_get_addr_call): Correct comment.
264 (is_branch_reloc): Add PLTCALL.
265 (is_plt_seq_reloc): New function.
266 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
267 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
268 entry for R_PPC64_PLTCALL.
269 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
270 (ppc_type_of_stub): Handle PLTCALL reloc.
271 (toc_adjusting_stub_needed): Likewise.
272 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
273 reloc insn. Nop out inline plt call sequence when resolving
274 locally. Handle __tls_get_addr inline plt call optimization.
275
2d7ad24e
AM
2762018-04-09 Alan Modra <amodra@gmail.com>
277
278 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
279 (struct ppc_stub_hash_entry): Add symtype field.
280 (PLT_KEEP): Define.
281 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
282 (create_linkage_sections): Create pltlocal and relpltlocal.
283 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
284 Set PLT_KEEP.
285 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
286 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
287 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
288 Keep PLT entries for inline calls against locals.
289 (ppc_build_one_stub): Use pltlocal as appropriate.
290 (ppc_size_one_stub): Likewise.
291 (ppc64_elf_size_stubs): Set symtype.
292 (build_global_entry_stubs_and_plt): Init pltlocal and write
293 relpltlocal for globals.
294 (write_plt_relocs_for_local_syms): Likewise for local syms.
295 (ppc64_elf_relocate_section): Support PLT for local syms.
296 * elf32-ppc.c (PLT_KEEP): Define.
297 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
298 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
299 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
300 Set PLT_KEEP. Adjust update_local_sym_info call.
301 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
302 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
303 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
304 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
305 (write_global_sym_plt): Init pltlocal and write relpltlocal.
306 (ppc_finish_symbols): Likewise for locals.
307
49c09209
AM
3082018-04-09 Alan Modra <amodra@gmail.com>
309
310 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
311 for local symbols to..
312 (write_plt_relocs_for_local_syms): ..here. New function.
313 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
314 global symbols to..
315 (build_global_entry_stubs_and_plt): ..here. Rename from
316 build_global_entry_stubs.
317 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
318 Call write_plt_relocs_for_local_syms.
319 * elf32-ppc.c (get_sym_h): New function.
320 (ppc_elf_relax_section): Use get_sym_h.
321 (ppc_elf_relocate_section): Move output of PLT relocs and glink
322 stubs for local symbols to..
323 (ppc_finish_symbols): ..here. New function.
324 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
325 global syms to..
326 (write_global_sym_plt): ..here. New function.
327 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
328 (ppc_finish_symbols): Declare.
329
08be3224
AM
3302018-04-09 Alan Modra <amodra@gmail.com>
331
332 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
333 (ppc_elf_relocate_section): Likewise.
334 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
335 (ppc64_elf_relocate_section): Likewise. Correct PLT16
336 resolution to plt entry relative to toc pointer.
337
37da22e5
AM
3382018-04-09 Alan Modra <amodra@gmail.com>
339
340 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
341 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
342 file when other TLS flags are tested in a mask.
343 (TLS_MARK, NON_GOT): Define.
344 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
345 (update_local_sym_info): Don't create got entry when NON_GOT.
346 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
347 Set TLS_MARK.
348 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
349 (ppc64_elf_relocate_section): Likewise.
350 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
351 __tls_get_addr calls lacking a marker reloc.
352 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
353 TLS_TPRELGD): Renumber. Update comment.
354 (TLS_MARK, NON_GOT): Define.
355 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
356 (update_local_sym_info): Don't create got entry when NON_GOT.
357 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
358 Set TLS_MARK.
359 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
360 __tls_get_addr calls lacking a marker reloc.
361
a6fd92b0
L
3622018-04-06 H.J. Lu <hongjiu.lu@intel.com>
363
364 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
365 R_X86_64_converted_reloc_bit.
366
3cba8b6c
L
3672018-04-05 H.J. Lu <hongjiu.lu@intel.com>
368
369 PR gas/22318
370 * configure: Regenerated.
371
0e8452bb
AM
3722018-04-05 Alan Modra <amodra@gmail.com>
373
374 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
375 (elf_hppa_info_to_howto_rel): Likewise.
376
8ee55178
MR
3772018-04-04 Maciej W. Rozycki <macro@mips.com>
378
379 * elf-hppa.h (elf_hppa_info_to_howto): Also return
380 unsuccessfully for unimplemented relocations.
381 (elf_hppa_info_to_howto_rel): Likewise.
382
5d7c8b80
MR
3832018-04-04 Maciej W. Rozycki <macro@mips.com>
384
385 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
386 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
387 howto lookup failure.
388 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
389 accordingly.
390 (elf32_i860_info_to_howto_rela): Likewise.
391 (elf32_i860_relocate_splitn): Likewise.
392 (elf32_i860_relocate_pc16): Likewise.
393 (elf32_i860_relocate_pc26): Likewise.
394 (elf32_i860_relocate_section): Likewise.
395
707bad1b
MR
3962018-04-04 Maciej W. Rozycki <macro@mips.com>
397
398 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
399 check for `visium_elf_howto_table' table access.
400
0cc919dc
MR
4012018-04-04 Maciej W. Rozycki <macro@mips.com>
402
403 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
404 check for `iq2000_elf_howto_table' table access.
405
f428698e
MR
4062018-04-04 Maciej W. Rozycki <macro@mips.com>
407
408 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
409 for `elf32_frv_howto_table' table access.
410
7ed6f92a
MR
4112018-04-04 Maciej W. Rozycki <macro@mips.com>
412
413 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
414 unsuccessfully for placeholder howtos.
415 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
416 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
417
75def2ab
MR
4182018-03-29 Maciej W. Rozycki <macro@mips.com>
419
420 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
421 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
422
8b6a949a
MR
4232018-03-28 Maciej W. Rozycki <macro@mips.com>
424
425 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
426 ATTRIBUTE_UNUSED from `abfd'.
427
d81270c3
MR
4282018-03-28 Maciej W. Rozycki <macro@mips.com>
429
430 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
431 `_bfd_error_handler' call formatting.
432
60dceb8d 4332018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
434
435 * elf32-mips.c (mips_info_to_howto_rel): Call
436 `mips_elf32_rtype_to_howto' directly rather than via
437 `->elf_backend_mips_rtype_to_howto'.
438
e04ef022
RL
4392018-03-28 Renlin Li <renlin.li@arm.com>
440
441 PR ld/22970
442 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
443 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
444 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
445 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
446 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
447 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
448 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
449 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
450 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
451 (elfNN_aarch64_final_link_relocate): Support new relocations.
452 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
453 relocations.
454 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
455
84f1b9fb
RL
4562018-03-28 Renlin Li <renlin.li@arm.com>
457
458 PR ld/22970
459 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
460 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
461 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
462 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
463 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
464 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
465 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
466 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
467 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
468 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
469 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
470 TLSLE_LDST16_TPREL_LO12,
471 TLSLE_LDST16_TPREL_LO12_NC,
472 TLSLE_LDST32_TPREL_LO12,
473 TLSLE_LDST32_TPREL_LO12_NC,
474 TLSLE_LDST64_TPREL_LO12,
475 TLSLE_LDST64_TPREL_LO12_NC,
476 TLSLE_LDST8_TPREL_LO12,
477 TLSLE_LDST8_TPREL_LO12_NC.
478 * bfd-in2.h: Regenerated.
479 * libbfd.h: Regenerated.
480
f8745e1c
EB
4812018-03-28 Eric Botcazou <ebotcazou@adacore.com>
482
483 PR ld/22972
484 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
485 has_old_style_got_reloc.
486 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
487 relocations. Fix a couple of long lines.
488 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
489 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
490 GOT relocations.
491
bf54968b
L
4922018-03-25 H.J. Lu <hongjiu.lu@intel.com>
493
494 PR ld/23000
495 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
496 ENDBR64 to the TLSDESC PLT entry.
497
0ccf57bd
AM
4982018-03-21 Alan Modra <amodra@gmail.com>
499
500 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
501 symbols. Use size_t counts. Delete redundant opd test.
502
4bad6366
AM
5032018-03-21 Alan Modra <amodra@gmail.com>
504
505 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
506
bac3c8c5
AM
5072018-03-21 Alan Modra <amodra@gmail.com>
508
509 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
510 field unsigned.
511 (update_local_sym_info): Likewise for local_got_tls_masks.
512 (ppc_elf_tls_optimize): Likewise for lgot_masks.
513
6a3858a6
AM
5142018-03-21 Alan Modra <amodra@gmail.com>
515
516 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
517 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
518 do in size_dynamic_sections.
519
675e2809
AM
5202018-03-21 Alan Modra <amodra@gmail.com>
521
522 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
523 without first checking array bounds.
524 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
525
416c34d6
L
5262018-03-20 H.J. Lu <hongjiu.lu@intel.com>
527
528 PR ld/22983
529 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
530 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
531
315aa1cf
NC
5322018-03-19 Nick Clifton <nickc@redhat.com>
533
534 * po/es.po: Updated Spanish translation.
535
0854d504
MF
5362018-03-15 Max Filippov <jcmvbkbc@gmail.com>
537
538 * elf32-xtensa.c (xlate_map_entry): Change types of address
539 fields from 'unsigned' to 'bfd_vma'.
540 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
541 the key argument to bsearch. Allow offsets past the end of a
542 section, use the last map entry for translation of such offsets.
543
f9671640
KLC
5442018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
545
546 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
547 Not support the target feature.
548 (nds32_elf_ex9_itb_base): Likewise.
549 (nds32_elf_ex9_import_table): Likewise.
550 (nds32_elf_ex9_finish): Likewise.
551 (nds32_elf_ex9_reloc_jmp): Likewise.
552 (nds32_elf_get_insn_with_reg): Likewise.
553 (nds32_get_local_syms): Likewise.
554 (nds32_elf_ex9_replace_instruction): Likewise.
555 (nds32_elf_ifc_calc): Likewise.
556 (nds32_elf_ifc_finish): Likewise.
557 (nds32_elf_ifc_replace): Likewise.
558 (nds32_elf_ifc_reloc): Likewise.
559
7dda8d3c
AM
5602018-03-14 Alan Modra <amodra@gmail.com>
561
562 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
563 sfpr size added before defining alias symbols.
564 (ppc64_elf_build_stubs): Add stub section padding before
565 copying sfpr contents and defining save/restore alias symbols.
566
9e223787
L
5672018-03-14 H.J. Lu <hongjiu.lu@intel.com>
568
569 PR ld/20882
570 * elflink.c (elf_gc_mark_debug_section): Also check the local
571 debug definition section.
572
3e33b239
NC
5732018-03-13 Nick Clifton <nickc@redhat.com>
574
575 PR 22113
576 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
577 function. Add an end address parameter. Check access of the data
578 pointer to make sure that they do not extend beyond the end
579 address. Return FALSE if any check fails. Add the end address
580 pointer to the ui structure.
581 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
582 codes to make sure that they do not extend beyond the end address
583 pointer. Print an error message and return immediately if any
584 check fails.
585
f657f8c4
NC
5862018-03-09 Nick Clifton <nickc@redhat.com>
587
588 * elf64-s390.c (elf_s390_relocate_section): Move check for
589 relocations against non-allocated sections to before the code that
590 handles ifunc relocations.
591 * elf32-s390.c (elf_s390_relocate_section): Likewise.
592 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
593 relocs against IFUNC symbols in non-allocated sections as relocs
594 against FUNC symbols.
595 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
596
347a8774
L
5972018-03-08 H.J. Lu <hongjiu.lu@intel.com>
598
599 PR ld/22929
600 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
601 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
602 relocation against FUNC symbol.
603 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
604
0c1ded8d
RL
6052018-03-07 Renlin Li <renlin.li@arm.com>
606
607 PR ld/20402
608 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
609 symbol, and don't emit relocation in specific case.
610
0118219e
AM
6112018-03-07 Alan Modra <amodra@gmail.com>
612
613 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
614 (mips_elf64_slurp_one_reloc_table): Pass on error.
615
dfb93f11
JC
6162018-03-03 James Cowgill <james.cowgill@mips.com>
617 Maciej W. Rozycki <macro@mips.com>
618
619 PR ld/21900
620 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
621 after calling `undefined_symbol' hook if this is an error
622 condition. Assume the value of 0 for the symbol requested
623 otherwise.
624
9a2ebffd
JW
6252018-03-02 Jim Wilson <jimw@sifive.com>
626
627 PR 22903
628 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
629 and nop instead of 4.
630 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
631 8 instead of 4.
632
788af978
JW
6332018-03-01 Jim Wilson <jimw@sifive.com>
634
635 PR 22756
636 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
637 else if instead of if.
638
5224fa03
AM
6392018-03-01 Alan Modra <amodra@gmail.com>
640
641 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
642
116acb2c
AM
6432018-02-28 Alan Modra <amodra@gmail.com>
644
645 PR 22887
646 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
647
eef10466
NC
6482018-02-28 Nick Clifton <nickc@redhat.com>
649
12c96342
NC
650 PR 22895
651 PR 22893
652 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
653 pointer. Drop unused abfd parameter. Check the size of the block
654 before initialising the data field. Return the end pointer if the
655 size is invalid.
656 (read_attribute_value): Adjust invocations of read_n_bytes.
657
eef10466
NC
658 PR 22894
659 * dwarf1.c (parse_die): Check the length of form blocks before
660 advancing the data pointer.
661
0d329c0a
AM
6622018-02-28 Alan Modra <amodra@gmail.com>
663
664 PR 22887
665 * aoutx.h (translate_symbol_table): Print an error message and set
666 bfd_error on finding an invalid name string offset.
667
f6aec96d
L
6682018-02-27 H.J. Lu <hongjiu.lu@intel.com>
669
670 * config.in: Regenerated.
671 * configure: Likewise.
672 * configure.ac: Add --enable-separate-code.
673 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
674 to 1 for Linux/x86 targets,
675 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
676 DEFAULT_LD_Z_SEPARATE_CODE is 1.
677
f3185997
NC
6782018-02-27 Nick Clifton <nickc@redhat.com>
679
e8f5af78
NC
680 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
681 message.
682 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
683 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
684 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
685 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
686 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
687 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
688 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
689 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
690 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
691
f3185997
NC
692 PR 22875
693 * elf-bfd.h (struct elf_backend_data): Change the return type of
694 the elf_info_to_howto and elf_info_to_howto_rel function pointers
695 to bfd_boolean.
696 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
697 value from the info_to_howto function and fail if that function
698 failed.
699 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
700 from the info_to_howto function.
701 (elf32_h8_relax_section): Likewise.
702 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
703 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
704 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
705 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
706 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
707 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
708 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
709 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
710 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
711 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
712 (riscv_elf_relocate_section): Likewise.
713 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
714 bfd_boolean. Issue an error message, set an error value and
715 return FALSE if the reloc is not recognized.
716 (elf_hppa_info_to_howto_rel): Likewise.
717 * elf-m10200.c (mn10200_info_to_howto): Likewise.
718 * elf-m10300.c (mn10300_info_to_howto): Likewise.
719 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
720 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
721 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
722 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
723 * elf32-bfin.c (bfin_info_to_howto): Likewise.
724 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
725 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
726 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
727 (cris_info_to_howto_rela): Likewise.
728 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
729 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
730 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
731 Likewise.
732 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
733 (elf32_dlx_info_to_howto_rel): Likewise.
734 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
735 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
736 * elf32-frv.c (frv_info_to_howto_rela)
737 (frvfdpic_info_to_howto_rel): Likewise.
738 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
739 * elf32-gen.c (elf_generic_info_to_howto)
740 (elf_generic_info_to_howto_rel): Likewise.
741 * elf32-h8300.c (elf32_h8_info_to_howto)
742 (elf32_h8_info_to_howto_rel): Likewise.
743 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
744 * elf32-i386.c (elf_i386_reloc_type_lookup)
745 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
746 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
747 Likewise.
748 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
749 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
750 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
751 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
752 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
753 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
754 Likewise.
755 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
756 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
757 * elf32-m68k.c (rtype_to_howto): Likewise.
758 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
759 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
760 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
761 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
762 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
763 Likewise.
764 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
765 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
766 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
767 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
768 Likewise.
769 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
770 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
771 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
772 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
773 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
774 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
775 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
776 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
777 * elf32-score.c (s3_bfd_score_info_to_howto)
778 (_bfd_score_info_to_howto): Likewise.
779 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
780 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
781 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
782 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
783 (elf32_tic6x_info_to_howto_rel): Likewise.
784 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
785 * elf32-v850.c (v850_elf_info_to_howto_rel)
786 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
787 * elf32-vax.c (rtype_to_howto): Likewise.
788 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
789 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
790 (elf32_wasm32_info_to_howto_rela): Likewise.
791 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
792 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
793 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
794 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
795 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
796 * elf64-gen.c (elf_generic_info_to_howto)
797 (elf_generic_info_to_howto_rel): Likewise.
798 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
799 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
800 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
801 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
802 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
803 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
804 Likewise.
805 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
806 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
807 Likewise.
808 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
809 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
810 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
811 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
812 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
813 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
814 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
815 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
816 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
817 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
818 Default to NULL.
819
1f4bace8
JW
8202018-02-26 Jim Wilson <jimw@sifive.com>
821 Stephan Schreiber <info@fs-driver.org>
822
823 PR 15904
824 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
825 call, set changed_contents and changed_relocs. Likewise after
826 successful ia64_elf_relax_br call.
827
6838f2be
AM
8282018-02-26 Alan Modra <amodra@gmail.com>
829
830 * elf.c (assign_file_positions_except_relocs): Don't segfault
831 when actual number of phdrs is less than allocated. Delete
832 outdated comment. Formatting.
833
38f14ab8
AM
8342018-02-26 Alan Modra <amodra@gmail.com>
835
836 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
837 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
838 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
839 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
840 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
841 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
842 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
843 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
844 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
845 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
846 error/warning messages.
847
6e05870c
AM
8482018-02-26 Alan Modra <amodra@gmail.com>
849
850 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
851 * syms.c: Standardize error/warning messages.
852
59d08d6c
AM
8532018-02-26 Alan Modra <amodra@gmail.com>
854
855 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
856 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
857 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
858 * peXXigen.c, * peicode.h: Standardize error/warning messages.
859
90b6238f
AM
8602018-02-26 Alan Modra <amodra@gmail.com>
861
862 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
863
2c1c9679
AM
8642018-02-26 Alan Modra <amodra@gmail.com>
865
866 * elfxx-mips.c: Standardize error/warning messages.
867
9793eb77
AM
8682018-02-26 Alan Modra <amodra@gmail.com>
869
870 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
871 * elflink.c: Standardize error/warning messages. Replace use of
872 linker callback einfo with _bfd_error_handler when possible.
873
0aa13fee
AM
8742018-02-26 Alan Modra <amodra@gmail.com>
875
876 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
877 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
878 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
879 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
880 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
881 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
882 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
883 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
884 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
885 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
886 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
887 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
888 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
889 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
890 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
891 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
892 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
893 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
894 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
895 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
896 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
897 unrecognized/unsupported reloc message.
898
cf97bcb0
AM
8992018-02-26 Alan Modra <amodra@gmail.com>
900
901 * elf32-ppc.c: Standardize error/warning messages. Use
902 _bfd_error_handler rather than einfo when einfo features not used.
903 * elf64-ppc.c: Likewise.
904
01f7e10c
AM
9052018-02-23 Alan Modra <amodra@gmail.com>
906
907 PR 22881
908 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
909 segment if no matching LOAD segment.
910
e859f655
KLC
9112018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
912
913 * elf32-nds32.h: Define mask for ict_model.
914
6e8d06db
JD
9152018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
916
917 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
918
b248d650
MR
9192018-02-19 Maciej W. Rozycki <macro@mips.com>
920
921 Revert
922 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
923
924 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
925 .reginfo section has wrong size.
926
6798f8bf
MR
9272018-02-19 Maciej W. Rozycki <macro@mips.com>
928
929 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
930 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
931 `.MIPS.abiflags' sections.
932 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
933 section's end.
934
8772de11
MR
9352018-02-19 Maciej W. Rozycki <macro@mips.com>
936
937 * section.c (SEC_FIXED_SIZE): New macro.
938 * bfd-in2.h: Regenerate.
939
4f7fd351
MR
9402018-02-19 Maciej W. Rozycki <macro@mips.com>
941
942 * section.c (SEC_HAS_GOT_REF): Remove macro.
943 * bfd-in2.h: Regenerate.
944
f2b740ac
AM
9452018-02-19 Alan Modra <amodra@gmail.com>
946
947 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
948 arguments.
949 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
950 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
951 (_bfd_riscv_relax_pc): Likewise and fix typos.
952 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
953 * libbfd.h: Regenerate.
954
8979927a
AM
9552018-02-19 Alan Modra <amodra@gmail.com>
956
957 * dwarf2.c (read_section): Don't use 'll' format modifier.
958 (find_abstract_instance): Likewise.
959 * elfcore.h (elf_core_file_p): Likewise.
960
2dcf00ce
AM
9612018-02-19 Alan Modra <amodra@gmail.com>
962
963 * bfd-in.h: Include inttypes.h or if not available define
964 PRId64, PRIu64 and PRIx64.
965 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
966 modifier to print bfd_vma.
967 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
968 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
969 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
970 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
971 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
972 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
973 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
974 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
975 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
976 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
977 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
978 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
979 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
980 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
981 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
982 and cast input to uint64_t, and similarly for Ld and Lu.
983 * bfd-in2.h: Regenerate.
984
c1c8c1ef
AM
9852018-02-19 Alan Modra <amodra@gmail.com>
986
987 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
988 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
989 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
990 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
991 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
992 * reloc.c: Replace use of %R and %T in format strings passed to
993 einfo and friends by %pR and %pT.
994
871b3ab2
AM
9952018-02-19 Alan Modra <amodra@gmail.com>
996
997 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
998 of %A and %B.
999 * aout-adobe.c: Update all messages using %A and %B.
1000 * aout-cris.c: Likewise.
1001 * aoutx.h: Likewise.
1002 * archive.c: Likewise.
1003 * binary.c: Likewise.
1004 * cache.c: Likewise.
1005 * coff-alpha.c: Likewise.
1006 * coff-arm.c: Likewise.
1007 * coff-i860.c: Likewise.
1008 * coff-mcore.c: Likewise.
1009 * coff-ppc.c: Likewise.
1010 * coff-rs6000.c: Likewise.
1011 * coff-sh.c: Likewise.
1012 * coff-tic4x.c: Likewise.
1013 * coff-tic54x.c: Likewise.
1014 * coff-tic80.c: Likewise.
1015 * coff64-rs6000.c: Likewise.
1016 * coffcode.h: Likewise.
1017 * coffgen.c: Likewise.
1018 * cofflink.c: Likewise.
1019 * coffswap.h: Likewise.
1020 * compress.c: Likewise.
1021 * cpu-arm.c: Likewise.
1022 * ecoff.c: Likewise.
1023 * elf-attrs.c: Likewise.
1024 * elf-eh-frame.c: Likewise.
1025 * elf-ifunc.c: Likewise.
1026 * elf-m10300.c: Likewise.
1027 * elf-properties.c: Likewise.
1028 * elf-s390-common.c: Likewise.
1029 * elf.c: Likewise.
1030 * elf32-arc.c: Likewise.
1031 * elf32-arm.c: Likewise.
1032 * elf32-avr.c: Likewise.
1033 * elf32-bfin.c: Likewise.
1034 * elf32-cr16.c: Likewise.
1035 * elf32-cr16c.c: Likewise.
1036 * elf32-cris.c: Likewise.
1037 * elf32-crx.c: Likewise.
1038 * elf32-d10v.c: Likewise.
1039 * elf32-d30v.c: Likewise.
1040 * elf32-epiphany.c: Likewise.
1041 * elf32-fr30.c: Likewise.
1042 * elf32-frv.c: Likewise.
1043 * elf32-gen.c: Likewise.
1044 * elf32-hppa.c: Likewise.
1045 * elf32-i370.c: Likewise.
1046 * elf32-i386.c: Likewise.
1047 * elf32-i960.c: Likewise.
1048 * elf32-ip2k.c: Likewise.
1049 * elf32-iq2000.c: Likewise.
1050 * elf32-lm32.c: Likewise.
1051 * elf32-m32c.c: Likewise.
1052 * elf32-m32r.c: Likewise.
1053 * elf32-m68hc11.c: Likewise.
1054 * elf32-m68hc12.c: Likewise.
1055 * elf32-m68hc1x.c: Likewise.
1056 * elf32-m68k.c: Likewise.
1057 * elf32-mcore.c: Likewise.
1058 * elf32-mep.c: Likewise.
1059 * elf32-metag.c: Likewise.
1060 * elf32-microblaze.c: Likewise.
1061 * elf32-moxie.c: Likewise.
1062 * elf32-msp430.c: Likewise.
1063 * elf32-mt.c: Likewise.
1064 * elf32-nds32.c: Likewise.
1065 * elf32-nios2.c: Likewise.
1066 * elf32-or1k.c: Likewise.
1067 * elf32-pj.c: Likewise.
1068 * elf32-ppc.c: Likewise.
1069 * elf32-rl78.c: Likewise.
1070 * elf32-rx.c: Likewise.
1071 * elf32-s390.c: Likewise.
1072 * elf32-score.c: Likewise.
1073 * elf32-score7.c: Likewise.
1074 * elf32-sh-symbian.c: Likewise.
1075 * elf32-sh.c: Likewise.
1076 * elf32-sh64.c: Likewise.
1077 * elf32-sparc.c: Likewise.
1078 * elf32-spu.c: Likewise.
1079 * elf32-tic6x.c: Likewise.
1080 * elf32-tilepro.c: Likewise.
1081 * elf32-v850.c: Likewise.
1082 * elf32-vax.c: Likewise.
1083 * elf32-visium.c: Likewise.
1084 * elf32-wasm32.c: Likewise.
1085 * elf32-xgate.c: Likewise.
1086 * elf32-xtensa.c: Likewise.
1087 * elf64-alpha.c: Likewise.
1088 * elf64-gen.c: Likewise.
1089 * elf64-hppa.c: Likewise.
1090 * elf64-ia64-vms.c: Likewise.
1091 * elf64-mmix.c: Likewise.
1092 * elf64-ppc.c: Likewise.
1093 * elf64-s390.c: Likewise.
1094 * elf64-sh64.c: Likewise.
1095 * elf64-sparc.c: Likewise.
1096 * elf64-x86-64.c: Likewise.
1097 * elfcode.h: Likewise.
1098 * elfcore.h: Likewise.
1099 * elflink.c: Likewise.
1100 * elfnn-aarch64.c: Likewise.
1101 * elfnn-ia64.c: Likewise.
1102 * elfnn-riscv.c: Likewise.
1103 * elfxx-mips.c: Likewise.
1104 * elfxx-sparc.c: Likewise.
1105 * elfxx-tilegx.c: Likewise.
1106 * elfxx-x86.c: Likewise.
1107 * hpux-core.c: Likewise.
1108 * ieee.c: Likewise.
1109 * ihex.c: Likewise.
1110 * libbfd.c: Likewise.
1111 * linker.c: Likewise.
1112 * mach-o.c: Likewise.
1113 * merge.c: Likewise.
1114 * mmo.c: Likewise.
1115 * oasys.c: Likewise.
1116 * pdp11.c: Likewise.
1117 * pe-mips.c: Likewise.
1118 * peXXigen.c: Likewise.
1119 * peicode.h: Likewise.
1120 * reloc.c: Likewise.
1121 * rs6000-core.c: Likewise.
1122 * srec.c: Likewise.
1123 * stabs.c: Likewise.
1124 * vms-alpha.c: Likewise.
1125 * xcofflink.c: Likewise.
1126
dbc88fc1
AM
11272018-02-19 Alan Modra <amodra@gmail.com>
1128
1129 PR 22845
1130 * elf.c (IS_TBSS): Define.
1131 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
1132 (assign_file_positions_for_non_load_sections): Revert last change.
1133 Properly calculate load segment limits to compare against relro limits.
1134
325ba6fb
AM
11352018-02-17 Alan Modra <amodra@gmail.com>
1136
1137 PR 22845
1138 * elf.c (assign_file_positions_for_non_load_sections): Ignore
1139 degenerate zero size PT_LOAD segments when finding one overlapping
1140 the PT_GNU_RELRO segment.
1141
d00dd7dc
AM
11422018-02-16 Alan Modra <amodra@gmail.com>
1143
1144 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
1145 (_bfd_bool_bfd_true): Rename from bfd_true.
1146 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
1147 (_bfd_int_bfd_0): Rename from bfd_0.
1148 (_bfd_uint_bfd_0): Rename from bfd_0u.
1149 (_bfd_long_bfd_0): Rename from bfd_0l.
1150 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
1151 (_bfd_void_bfd): Rename from bfd_void.
1152 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
1153 (_bfd_bool_bfd_link_false_error),
1154 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
1155 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
1156 (_bfd_bool_bfd_asection_bfd_asection_true),
1157 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
1158 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
1159 * archive.c (_bfd_noarchive_get_elt_at_index),
1160 (_bfd_noarchive_openr_next_archived_file),
1161 (_bfd_noarchive_construct_extended_name_table),
1162 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
1163 (_bfd_noarchive_write_armap): New functions.
1164 * archures.c (_bfd_nowrite_set_arch_mach): New function.
1165 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
1166 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
1167 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
1168 (alpha_ecoff_swap_coff_lineno_out),
1169 (alpha_ecoff_swap_coff_reloc_out): New functions.
1170 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
1171 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
1172 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
1173 (mips_ecoff_swap_coff_lineno_out),
1174 (mips_ecoff_swap_coff_reloc_out): New functions.
1175 * coffcode.h (coff_set_alignment_hook): Replace define with
1176 new function.
1177 (symname_in_debug_hook): Likewise.
1178 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
1179 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
1180 * elf.c (assign_file_positions_except_relocs): Test
1181 elf_backend_allow_non_load_phdr for NULL.
1182 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
1183 _bfd_elf_link_omit_section_dynsym. Update uses.
1184 (_bfd_elf_omit_section_dynsym_all): New function.
1185 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
1186 (_bfd_elf_omit_section_dynsym_default): Declare.
1187 (_bfd_elf_omit_section_dynsym_all): Declare.
1188 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
1189 (_bfd_nolink_bfd_get_relocated_section_contents),
1190 (_bfd_nolink_bfd_lookup_section_flags),
1191 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
1192 (_bfd_nolink_bfd_link_hash_table_create),
1193 (_bfd_nolink_bfd_link_just_syms),
1194 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1195 (_bfd_nolink_bfd_link_split_section),
1196 (_bfd_nolink_section_already_linked),
1197 (_bfd_nolink_bfd_define_common_symbol),
1198 (_bfd_nolink_bfd_define_start_stop): New functions.
1199 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1200 (_bfd_norelocs_bfd_reloc_name_lookup),
1201 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1202 * section.c (_bfd_nowrite_set_section_contents): New function.
1203 * syms.c (_bfd_nosymbols_canonicalize_symtab),
1204 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1205 (_bfd_nosymbols_get_symbol_version_string),
1206 (_bfd_nosymbols_bfd_is_local_label_name),
1207 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1208 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1209 (_bfd_nosymbols_bfd_make_debug_symbol),
1210 ( _bfd_nosymbols_read_minisymbols),
1211 ( _bfd_nosymbols_minisymbol_to_symbol),
1212 (_bfd_nodynamic_get_synthetic_symtab): New functions.
1213 * libbfd-in.h: Declare new functions. Update existing defines,
1214 removing casts.
1215 * aix386-core.c: Update to use new hooks. Formatting.
1216 * aout-adobe.c: Likewise.
1217 * aout-arm.c: Likewise.
1218 * aout-target.h: Likewise.
1219 * aout-tic30.c: Likewise.
1220 * aoutf1.h: Likewise.
1221 * binary.c: Likewise.
1222 * bout.c: Likewise.
1223 * cisco-core.c: Likewise.
1224 * coff-alpha.c: Likewise.
1225 * coff-i386.c: Likewise.
1226 * coff-i860.c: Likewise.
1227 * coff-i960.c: Likewise.
1228 * coff-ia64.c: Likewise.
1229 * coff-mips.c: Likewise.
1230 * coff-ppc.c: Likewise.
1231 * coff-rs6000.c: Likewise.
1232 * coff-sh.c: Likewise.
1233 * coff-tic30.c: Likewise.
1234 * coff-tic54x.c: Likewise.
1235 * coff-x86_64.c: Likewise.
1236 * coff64-rs6000.c: Likewise.
1237 * coffcode.h: Likewise.
1238 * elf-m10300.c: Likewise.
1239 * elf32-cr16.c: Likewise.
1240 * elf32-lm32.c: Likewise.
1241 * elf32-m32r.c: Likewise.
1242 * elf32-metag.c: Likewise.
1243 * elf32-score.c: Likewise.
1244 * elf32-score7.c: Likewise.
1245 * elf32-tilepro.c: Likewise.
1246 * elf32-xstormy16.c: Likewise.
1247 * elf32-xtensa.c: Likewise.
1248 * elf64-alpha.c: Likewise.
1249 * elf64-hppa.c: Likewise.
1250 * elf64-ia64-vms.c: Likewise.
1251 * elf64-mmix.c: Likewise.
1252 * elf64-sh64.c: Likewise.
1253 * elfnn-ia64.c: Likewise.
1254 * elfxx-sparc.c: Likewise.
1255 * elfxx-target.h: Likewise.
1256 * elfxx-tilegx.c: Likewise.
1257 * elfxx-x86.h: Likewise.
1258 * hp300hpux.c: Likewise.
1259 * hppabsd-core.c: Likewise.
1260 * hpux-core.c: Likewise.
1261 * i386msdos.c: Likewise.
1262 * i386os9k.c: Likewise.
1263 * ieee.c: Likewise.
1264 * ihex.c: Likewise.
1265 * irix-core.c: Likewise.
1266 * libaout.h: Likewise.
1267 * libecoff.h: Likewise.
1268 * mach-o-target.c: Likewise.
1269 * mach-o.c: Likewise.
1270 * mipsbsd.c: Likewise.
1271 * mmo.c: Likewise.
1272 * netbsd-core.c: Likewise.
1273 * nlm-target.h: Likewise.
1274 * oasys.c: Likewise.
1275 * osf-core.c: Likewise.
1276 * pdp11.c: Likewise.
1277 * pe-mips.c: Likewise.
1278 * pe-x86_64.c: Likewise.
1279 * pef.c: Likewise.
1280 * plugin.c: Likewise.
1281 * ppcboot.c: Likewise.
1282 * ptrace-core.c: Likewise.
1283 * sco5-core.c: Likewise.
1284 * som.c: Likewise.
1285 * sparclynx.c: Likewise.
1286 * srec.c: Likewise.
1287 * tekhex.c: Likewise.
1288 * trad-core.c: Likewise.
1289 * verilog.c: Likewise.
1290 * versados.c: Likewise.
1291 * vms-alpha.c: Likewise.
1292 * vms-lib.c: Likewise.
1293 * wasm-module.c: Likewise.
1294 * xsym.c: Likewise.
1295 * libbfd.h: Regenerate.
1296
2a0d9853
JW
12972018-02-15 Jim Wilson <jimw@sifive.com>
1298
09ca4b9d
JW
1299 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1300 symbols whose section address is zero.
1301
2a0d9853
JW
1302 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1303 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
1304 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
1305 Add %X%P to error messages.
1306
e513bd38
EB
13072018-02-15 Eric Botcazou <ebotcazou@adacore.com>
1308
1309 PR ld/22832
1310 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1311 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1312 and assert that the result of the call is not NULL.
1313
12ef3f5a
NC
13142018-02-14 Nick Clifton <nickc@redhat.com>
1315
1316 PR 22823
1317 Revert previous delta. Add extra casts to avoid compile time
1318 warnings instead.
1319 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1320 cast to avoid warning from gcc v8 compiler.
1321 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1322 (_bfd_generic_bfd_set_private_flags): Likewise.
1323 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1324 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1325 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1326 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1327 (_bfd_noarchive_construct_extended_name_table): Likewise.
1328 (_bfd_noarchive_truncate_arname): Likewise.
1329 (_bfd_noarchive_write_ar_hdr): Likewise.
1330 (_bfd_noarchive_get_elt_at_index): Likewise.
1331 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1332 (_bfd_nosymbols_print_symbol): Likewise.
1333 (_bfd_nosymbols_get_symbol_info): Likewise.
1334 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1335 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1336 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1337 (_bfd_nosymbols_get_lineno): Likewise.
1338 (_bfd_nosymbols_find_nearest_line): Likewise.
1339 (_bfd_nosymbols_find_line): Likewise.
1340 (_bfd_nosymbols_find_inliner_info): Likewise.
1341 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1342 (_bfd_nosymbols_read_minisymbols): Likewise.
1343 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1344 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1345 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1346 (_bfd_nowrite_set_arch_mach): Likewise.
1347 (_bfd_nowrite_set_section_contents): Likewise.
1348 (_bfd_nolink_sizeof_headers): Likewise.
1349 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1350 (_bfd_nolink_bfd_relax_section): Likewise.
1351 (_bfd_nolink_bfd_gc_sections): Likewise.
1352 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1353 (_bfd_nolink_bfd_merge_sections): Likewise.
1354 (_bfd_nolink_bfd_is_group_section): Likewise.
1355 (_bfd_nolink_bfd_discard_group): Likewise.
1356 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1357 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1358 (_bfd_nolink_bfd_link_just_syms): Likewise.
1359 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1360 (_bfd_nolink_bfd_final_link): Likewise.
1361 (_bfd_nolink_bfd_link_split_section): Likewise.
1362 (_bfd_nolink_section_already_linked): Likewise.
1363 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1364 (_bfd_nolink_bfd_define_start_stop): Likewise.
1365 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1366 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1367 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1368 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1369 * libbfd.c (bfd_false_any): Delete.
1370 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1371 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1372 * libbfd.h (extern): Regenerate
1373 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1374 cast to avoid warning from gcc v8 compiler.
1375 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1376 * binary.c (binary_get_symbol_info): Likewise.
1377 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1378 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1379 * coffcode.h (coff_set_alignment_hook): Likewise.
1380 (symname_in_debug_hook): Likewise.
1381 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1382 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1383 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1384 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1385 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1386 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1387 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1388 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1389 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1390 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1391 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1392 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1393 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1394 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1395 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1396 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1397 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1398 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1399 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1400 (bfd_elfNN_bfd_set_private_flags): Likewise.
1401 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1402 (elf_backend_init_index_section): Likewise.
1403 (elf_backend_allow_non_load_phdr): Likewise.
1404 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1405 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1406 * ieee.c (ieee_construct_extended_name_table): Likewise.
1407 (ieee_write_armap): Likewise.
1408 (ieee_write_ar_hdr): Likewise.
1409 (ieee_bfd_is_target_special_symbol): Likewise.
1410 * ihex.c (ihex_canonicalize_symtab): Likewise.
1411 (ihex_bfd_is_target_special_symbol): Likewise.
1412 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1413 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1414 (_bfd_ecoff_set_alignment_hook): Likewise.
1415 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1416 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1417 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1418 * oasys.c (oasys_construct_extended_name_table): Likewise.
1419 (oasys_write_armap): Likewise.
1420 (oasys_write_ar_hdr): Likewise.
1421 (oasys_bfd_is_target_special_symbol): Likewise.
1422 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1423 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1424 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1425 * som.c (som_bfd_is_target_special_symbol): Likewise.
1426 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1427 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1428 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1429 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1430 (versados_bfd_reloc_name_lookup): Likewise.
1431 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1432 (vms_bfd_define_start_stop): Likewise.
1433 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1434 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1435 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1436
451875b4
L
14372018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1438
1439 PR ld/22842
1440 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1441 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1442 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1443 R_X86_64_PC32 reloc against dynamic function in data section.
1444 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1445 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1446 against dynamic function in data section.
1447 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1448 function address only if pcrel_plt is true.
1449 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1450 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1451 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1452 PC-relative relocation against a function definition in data
1453 secton in PIE. Remove the obsolete comments.
1454 (elf_x86_link_hash_table): Add pcrel_plt.
1455
1031c264
L
14562018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1459 instead of bfd_link_pic, for building shared library.
1460
bd7ab16b
L
14612018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1462
1463 PR gas/22791
1464 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1465 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1466 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1467 against protected function in shared object.
1468
80c96350
ST
14692018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1470
1471 PR 22828
1472 * po/ru.po: Fix typo in Russian translation.
1473
87993319
MR
14742018-02-13 Maciej W. Rozycki <macro@mips.com>
1475
1476 * wasm-module.c (wasm_scan_name_function_section): Rename
1477 `index' local variable to `idx'.
1478
68d20676
NC
14792018-02-13 Nick Clifton <nickc@redhat.com>
1480
1481 PR 22823
1482 Fix compile time warnings generated by gcc version 8.
1483 * libbfd-in.h: Remove extraneous text from prototypes.
1484 Add prototypes for bfd_false_any, bfd_true_any,
1485 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1486 bfd_n1_any, bfd_void_any.
1487 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1488 function.
1489 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1490 (_bfd_generic_bfd_set_private_flags): Likewise.
1491 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1492 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1493 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1494 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1495 (_bfd_noarchive_construct_extended_name_table): Likewise.
1496 (_bfd_noarchive_truncate_arname): Likewise.
1497 (_bfd_noarchive_write_ar_hdr): Likewise.
1498 (_bfd_noarchive_get_elt_at_index): Likewise.
1499 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1500 (_bfd_nosymbols_print_symbol): Likewise.
1501 (_bfd_nosymbols_get_symbol_info): Likewise.
1502 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1503 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1504 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1505 (_bfd_nosymbols_get_lineno): Likewise.
1506 (_bfd_nosymbols_find_nearest_line): Likewise.
1507 (_bfd_nosymbols_find_line): Likewise.
1508 (_bfd_nosymbols_find_inliner_info): Likewise.
1509 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1510 (_bfd_nosymbols_read_minisymbols): Likewise.
1511 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1512 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1513 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1514 (_bfd_nowrite_set_arch_mach): Likewise.
1515 (_bfd_nowrite_set_section_contents): Likewise.
1516 (_bfd_nolink_sizeof_headers): Likewise.
1517 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1518 (_bfd_nolink_bfd_relax_section): Likewise.
1519 (_bfd_nolink_bfd_gc_sections): Likewise.
1520 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1521 (_bfd_nolink_bfd_merge_sections): Likewise.
1522 (_bfd_nolink_bfd_is_group_section): Likewise.
1523 (_bfd_nolink_bfd_discard_group): Likewise.
1524 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1525 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1526 (_bfd_nolink_bfd_link_just_syms): Likewise.
1527 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1528 (_bfd_nolink_bfd_final_link): Likewise.
1529 (_bfd_nolink_bfd_link_split_section): Likewise.
1530 (_bfd_nolink_section_already_linked): Likewise.
1531 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1532 (_bfd_nolink_bfd_define_start_stop): Likewise.
1533 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1534 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1535 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1536 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1537 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1538 accepts one or more arguments.
1539 (bfd_true_any): Likewise.
1540 (bfd_nullvoidptr_any): Likewise.
1541 (bfd_0_any): Likewise.
1542 (bfd_0u_any): Likewise.
1543 (bfd_0l_any): Likewise.
1544 (_bfd_n1_any): Likewise.
1545 (bfd_void_any): Likewise.
1546 * libbfd.h (extern): Regenerate
1547 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1548 based dummy function.
1549 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1550 * binary.c (binary_get_symbol_info): Likewise.
1551 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1552 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1553 * coffcode.h (coff_set_alignment_hook): Likewise.
1554 (symname_in_debug_hook): Likewise.
1555 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1556 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1557 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1558 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1559 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1560 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1561 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1562 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1563 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1564 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1565 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1566 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1567 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1568 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1569 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1570 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1571 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1572 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1573 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1574 (bfd_elfNN_bfd_set_private_flags): Likewise.
1575 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1576 (elf_backend_init_index_section): Likewise.
1577 (elf_backend_allow_non_load_phdr): Likewise.
1578 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1579 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1580 * ieee.c (ieee_construct_extended_name_table): Likewise.
1581 (ieee_write_armap): Likewise.
1582 (ieee_write_ar_hdr): Likewise.
1583 (ieee_bfd_is_target_special_symbol): Likewise.
1584 * ihex.c (ihex_canonicalize_symtab): Likewise.
1585 (ihex_bfd_is_target_special_symbol): Likewise.
1586 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1587 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1588 (_bfd_ecoff_set_alignment_hook): Likewise.
1589 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1590 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1591 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1592 * oasys.c (oasys_construct_extended_name_table): Likewise.
1593 (oasys_write_armap): Likewise.
1594 (oasys_write_ar_hdr): Likewise.
1595 (oasys_bfd_is_target_special_symbol): Likewise.
1596 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1597 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1598 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1599 * som.c (som_bfd_is_target_special_symbol): Likewise.
1600 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1601 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1602 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1603 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1604 (versados_bfd_reloc_name_lookup): Likewise.
1605 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1606 (vms_bfd_define_start_stop): Likewise.
1607 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1608 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1609 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1610 * elf32-arc.c (get_replace_function): Assign replacement function
1611 to func pointer.
1612 * elf32-i370.c (i370_noop): Update prototype.
1613
6e5e9d58
AM
16142018-02-13 Alan Modra <amodra@gmail.com>
1615
1616 PR 22836
1617 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1618 relocation sections. If size reduces to just the flag word,
1619 remove that too and mark with SEC_EXCLUDE.
1620 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1621
f2731e0c
AM
16222018-02-13 Alan Modra <amodra@gmail.com>
1623
1624 PR 22829
1625 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1626 PT_GNU_RELRO setup.
1627
830db048
ZF
16282018-02-12 Zebediah Figura <z.figura12@gmail.com>
1629
1630 * i386msdos.c (msdos_mkobject); New function.
1631 (msdos_object_p): New function.
1632 (i386_msdos_vec): Use msdos_object_p as the check_format
1633 function.
1634 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1635 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1636 IMAGE_NT_SIGNATURE.
1637 * peXXigen.c: Likewise.
1638 * coff-ia64.c: Likewise.
1639
94fe5757
NC
16402018-02-12 Nick Clifton <nickc@redhat.com>
1641
1642 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1643 assignment.
0b8683b7 1644 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 1645
d805612e 16462018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
1647
1648 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1649 (sparc_elf_append_rela): Assert that there is enough room in section.
1650 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1651 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1652 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1653 For a symbol subject to a GOT relocation, reserve a slot in the
1654 relocation section if the symbol isn't dynamic and we are in PIC mode.
1655 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1656 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1657 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1658 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1659 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1660 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1661 undefined weak symbol with non-default visibility. Remove superfluous
1662 'else' and fix formatting.
1663
3b4c3844
L
16642018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1665
1666 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1667 is_solaris.
1668 (i386_elf32_sol2_vec): Don't declare.
1669 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1670 Don't set need_global_offset_table.
1671 (elf_i386_solaris_arch_bed): New.
1672 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1673 Solaris.
1674 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1675 target_os != is_nacl instead of target_os == is_normal.
1676 (x86_64_elf64_sol2_vec): Don't declare.
1677 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1678 is_nacl instead of target_os == is_normal. Don't set
1679 need_global_offset_table.
1680 (elf_x86_64_solaris_arch_bed): New.
1681 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1682 Solaris.
1683 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1684 _GLOBAL_OFFSET_TABLE_ for Solaris.
1685 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1686 need_global_offset_table.
1687 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1688 (elf_x86_link_hash_table): Remove need_global_offset_table.
1689 (elf_x86_init_table): Likewise.
1690
15b23f36
L
16912018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1692
1693 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1694 Remove prototype.
1695 (i386_elf32_sol2_vec): Declared.
1696 (elf_i386_link_setup_gnu_properties): Set
1697 need_global_offset_table with info->output_bfd->xvec.
1698 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1699 Remove prototype.
1700 (x86_64_elf64_sol2_vec): Declared.
1701 (elf_x86_64_link_setup_gnu_properties): Set
1702 need_global_offset_table with info->output_bfd->xvec.
1703
dc11dea2
L
17042018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1705
1706 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1707 New prototype.
1708 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1709 for Solaris.
1710 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1711 New prototype.
1712 (elf_x86_64_link_setup_gnu_properties): Set
1713 need_global_offset_table for Solaris.
1714 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1715 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1716 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1717 need_global_offset_table.
1718 * elfxx-x86.h (elf_x86_link_hash_table): Add
1719 need_global_offset_table.
1720 (elf_x86_init_table): Likewise.
1721
3f48fe4a
JW
17222018-02-08 Jim Wilson <jimw@sifive.com>
1723
1724 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1725 change.
1726
ef135d43
NC
17272018-02-08 Nick Clifton <nickc@redhat.com>
1728
1729 PR 22788
1730 * elf.c (elf_parse_notes): Reject notes with excessuively large
1731 alignments.
1732
407aa07c
AM
17332018-02-07 Alan Modra <amodra@gmail.com>
1734
1735 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1736 * elf32-ppc.c: Remove speculation barrier support.
1737 * elf32-ppc.h: Likewise.
1738 * elf64-ppc.c: Likewise.
1739 * elf64-ppc.h: Likewise.
1740
ed01220c
JW
17412018-02-06 Jim Wilson <jimw@sifive.com>
1742
1743 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1744 callback to report an error.
1745
c20c30f6
EB
17462018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1747
1748 PR ld/22263
1749 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1750 into call to !bfd_link_executable and tidy up.
1751 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1752 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1753 !bfd_link_executable.
1754 <R_SPARC_TLS_IE_HI22>: Likewise.
1755 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1756 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1757 !bfd_link_executable.
1758 <R_SPARC_WPLT30>: Tidy up.
1759 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1760 !bfd_link_executable.
1761 (allocate_dynrelocs): Likewise.
1762 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1763 <R_SPARC_TLS_GD_HI22>: Merge into...
1764 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1765 sparc_elf_tls_transition and remove redundant code.
1766 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1767 !bfd_link_executable.
1768 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1769 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1770 <R_SPARC_TLS_LDM_CALL>: Likewise.
1771 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1772 <R_SPARC_TLS_GD_ADD>: Likewise.
1773 <R_SPARC_TLS_LDM_ADD>: Likewise.
1774 <R_SPARC_TLS_LDO_ADD>: Likewise.
1775 <R_SPARC_TLS_IE_LD>: Likewise.
1776
46d09186
NC
17772018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1778
1779 PR 22789
1780 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1781 functions failed to find the function name, try the generic elf
1782 find function instead.
1783
8278e7ce
SDJ
17842018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1785
1786 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1787 'memcpy' instead of 'strncpy' when writing the magic number.
1788
64e234d4
NC
17892018-02-06 Nick Clifton <nickc@redhat.com>
1790
1791 PR 22794
1792 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1793 section before attempting to read it in.
1794 (bfd_get_alt_debug_link_info): Likewise.
1795
422f3d3d
PC
17962018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1797
1798 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1799 line information in addition to name, if they can be found.
1800
279b2f94
RL
18012018-02-05 Renlin Li <renlin.li@arm.com>
1802
1803 PR ld/22764
1804 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1805 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1806 check for writeable section as well.
1807
cd048363
L
18082018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1809
1810 PR ld/22782
1811 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1812 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1813 undefined weak symbol to 0.
1814 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1815 if _GLOBAL_OFFSET_TABLE_ is referenced.
1816 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1817 got_referenced instead of ref_regular_nonweak. Remove the
1818 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1819 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1820
e65b1a78
MR
18212018-02-05 Maciej W. Rozycki <macro@mips.com>
1822
1823 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1824 initialize `hi_reloc'.
1825
2d6dda71
MR
18262018-02-05 Maciej W. Rozycki <macro@mips.com>
1827
1828 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1829 SHT_MIPS_REGINFO sections don't assert the correct size and
1830 report an error instead.
1831
75506100
MR
18322018-02-05 Maciej W. Rozycki <macro@mips.com>
1833
1834 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1835 status from `->elf_backend_section_processing'.
1836
7f02625e
JW
18372018-02-02 Jim Wilson <jimw@sifive.com>
1838
1839 PR ld/22756
1840 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1841 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1842 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1843 Pass new argument to riscv_relax_delete_bytes.
1844 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1845 ATTRIBUTE_UNUSED from link_info parameter.
1846
d830549d
AM
18472018-02-02 Alan Modra <amodra@gmail.com>
1848
1849 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1850 emitted for toc sequence optimization. Set and use "howto" later.
1851
e99955cd
SM
18522018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1853
1854 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1855 arithmetic on NULL pointer.
1856 * elflink.c (_bfd_elf_archive_symbol_lookup,
1857 elf_link_add_archive_symbols): Likewise.
1858
bf3077a6
MM
18592018-01-31 Michael Matz <matz@suse.de>
1860
1861 * elflink.c (bfd_elf_define_start_stop): Fix check of
1862 def_dynamic.
1863
823143c6
L
18642018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1865
1866 PR ld/21964
1867 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1868 __stop symbols are referenced by shared objects.
1869
76cb3a89
AM
18702018-01-30 Alan Modra <amodra@gmail.com>
1871
1872 PR 22758
1873 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1874 segment when demand paged with lma on the same page. Test this
1875 before load/non-load, executable/non-executable,
1876 writable/non-writable tests and simplify. Delete bogus relro
1877 condition in writable/non-writable test. Delete outdated
1878 comment. Formatting.
1879
36b8fda5
AM
18802018-01-30 Alan Modra <amodra@gmail.com>
1881
1882 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1883 symbols dynamic.
1884
eb77f6a4
AM
18852018-01-29 Alan Modra <amodra@gmail.com>
1886
1887 PR 22741
1888 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1889 range before converting to a symbol table pointer.
1890
7d73b4c8
NC
18912018-01-27 Nick Clifton <nickc@redhat.com>
1892
1893 * po/ru.po: Updated Russian translation.
1894
32253bb7
AM
18952018-01-26 Alan Modra <amodra@gmail.com>
1896
1897 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1898 they are defined dynamically.
1899
ba21f564
AM
19002018-01-26 Alan Modra <amodra@gmail.com>
1901
1902 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1903 .branch_lt changes size.
1904
38e64b0e
AM
19052018-01-25 Alan Modra <amodra@gmail.com>
1906
1907 PR 22746
1908 * elfcode.h (elf_object_p): Avoid integer overflow.
1909
bb363086
EB
19102018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1911
1912 PR ld/22727
1913 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1914 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1915
1916 Revert
1917 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1918
1919 PR ld/22263
1920 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1921 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1922 bfd_link_executable for TLS check.
1923 (_bfd_sparc_elf_check_relocs): Likewise.
1924 (allocate_dynrelocs): Likewise.
1925 (_bfd_sparc_elf_relocate_section): Likewise.
1926
1daf502a
RL
19272018-01-24 Renlin Li <renlin.li@arm.com>
1928
1929 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1930 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1931 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1932 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1933 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1934 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1935 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1936
32247401
RL
19372018-01-24 Renlin Li <renlin.li@arm.com>
1938
1939 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1940 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1941 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1942 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1943 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1944 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1945 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1946 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1947 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1948 * bfd-in2.h: Regenerate.
1949 * libbfd.h: Regenerate.
1950
1c5e4ee9
MR
19512018-01-23 Maciej W. Rozycki <macro@mips.com>
1952
1953 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1954 `mips_elf32_section_processing' comment reference.
1955
8a1b824a
L
19562018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1957
1958 PR ld/22721
1959 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1960 versioned __tls_get_addr symbol.
1961
ee3fbc1e
NC
19622018-01-19 Nick Clifton <nickc@redhat.com>
1963
1964 * po/fr.po: Updated French translation.
1965
691d2e9a
AM
19662018-01-18 Alan Modra <amodra@gmail.com>
1967
1968 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1969 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1970 (ppc64_elf_build_stubs): Likewise.
1971
4bfce128
NC
19722018-01-17 Nick Clifton <nickc@redhat.com>
1973
1974 * po/ru.po: Updated Russian translation.
1975 * po/uk/po: Updated Ukranian translation.
1976
c75bc4f7
AM
19772018-01-17 Alan Modra <amodra@gmail.com>
1978
1979 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1980
1be5d8d3
AM
19812018-01-17 Alan Modra <amodra@gmail.com>
1982
1983 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1984 (CRSETEQ, BEQCTRM): Define.
1985 (is_nonpic_glink_stub): Don't check bctr.
1986 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1987 (ppc_elf_relax_section): Size speculation barrier.
1988 (output_bctr): New function.
1989 (write_glink_stub): Use output_bctr.
1990 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1991 (ppc_elf_finish_dynamic_symbol): Likewise.
1992 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1993 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1994 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1995 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1996 (size_global_entry_stubs): Handle speculation barrier sizing.
1997 (plt_stub_size): Likewise.
1998 (output_bctr): New function.
1999 (build_plt_stub, build_tls_get_addr_stub): Output speculation
2000 barrier.
2001 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2002 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2003 (build_global_entry_stubs): Output speculation barrier.
2004 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2005 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2006
9e390558
AM
20072018-01-17 Alan Modra <amodra@gmail.com>
2008
2009 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2010 __tls_get_addr_opt, and alignment sizing.
2011 (TLS_GET_ADDR_GLINK_SIZE): Delete.
2012 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2013 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2014 or 8 insns.
2015 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2016 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2017 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
2018 by PLT reloc count.
2019 (write_glink_stub): Handle __tls_get_addr_opt stub.
2020 Pad out to size given by GLINK_ENTRY_SIZE.
2021 (ppc_elf_relocate_section): Adjust write_glink_stub call.
2022 (ppc_elf_finish_dynamic_symbol): Likewise.
2023 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2024 insn array since so many need rewriting.
2025 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2026 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2027 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
2028 nops. Adjust all uses.
2029 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2030 in glink_vma calculation.
2031 (struct ppc_link_hash_table): Add global_entry section pointer.
2032 (create_linkage_sections): Create separate section for global
2033 entry stubs.
2034 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2035 (size_global_entry_stubs): Handle sizing for aligned stubs.
2036 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2037 and don't stash end of glink branch table in rawsize.
2038 (ppc_build_one_stub): Rewrite stub size calculations.
2039 (build_global_entry_stubs): Use new section.
2040 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2041 Build lazy link stubs out to end of section. Build global entry
2042 stubs in new section.
2043
616dcb87
NC
20442018-01-15 Nick Clifton <nickc@redhat.com>
2045
2046 * po/uk.po: Updated Ukranian translation.
2047
3957a496
NC
20482018-01-13 Nick Clifton <nickc@redhat.com>
2049
2050 * po/bfd.pot: Regenerated.
2051
769c7ea5
NC
20522018-01-13 Nick Clifton <nickc@redhat.com>
2053
2054 * version.m4: Bump version to 2.30.51
2055 * configure: Regenerate.
2056
faf766e3
NC
20572018-01-13 Nick Clifton <nickc@redhat.com>
2058
2059 2.30 branch created.
2060
564e11c9
JW
20612018-01-12 Jens Widell <jl@opera.com>
2062
2063 * elf.c (setup_group): Optimize search for group by remembering
2064 last found group and restarting search at that index.
2065 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2066
a78eea16
AM
20672018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
2068
2069 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2070 bfd_link_common_skip_none in switch.
2071
87e79a65
AM
20722018-01-12 Alan Modra <amodra@gmail.com>
2073
2074 PR ld/22649
2075 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2076 references on forced local symbols.
2077
58807c48
VI
20782018-01-12 Vlad Ivanov <vlad@ivanov.email>
2079
2080 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2081 .reginfo section has wrong size.
2082
2888249f
L
20832018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2084
2085 PR ld/22393
2086 * elf.c (_bfd_elf_map_sections_to_segments): When generating
2087 separate code and read-only data LOAD segments, create a new
2088 LOAD segment if the previous section contains text and the
2089 current section doesn't or vice versa. Don't put a writable
2090 section in a read-only segment if there is a RELRO segment.
2091
d664fd41
L
20922018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2093
2094 PR ld/22649
2095 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2096 references on forced local symbols.
2097
8b6f4cd3
L
20982018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2099
2100 PR ld/22677
2101 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2102 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2103
9c70c522 21042018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
2105
2106 PR 22662
2107 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2108
ddb2bbcf
JB
21092018-01-03 John Baldwin <jhb@FreeBSD.org>
2110
2111 * elf.c (elfcore_grok_freebsd_note): Handle
2112 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2113 NT_FREEBSD_PROCSTAT_VMMAP.
2114
219d1afa
AM
21152018-01-03 Alan Modra <amodra@gmail.com>
2116
2117 Update year range in copyright notice of all files.
2118
1e563868 2119For older changes see ChangeLog-2017
3499769a 2120\f
1e563868 2121Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
2122
2123Copying and distribution of this file, with or without modification,
2124are permitted in any medium without royalty provided the copyright
2125notice and this notice are preserved.
2126
2127Local Variables:
2128mode: change-log
2129left-margin: 8
2130fill-column: 74
2131version-control: never
2132End:
This page took 0.23825 seconds and 4 git commands to generate.