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