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