ChangeLog revision 1.10.2.1 1 2018-07-18 Nick Clifton <nickc (a] redhat.com>
2
3 2.31.1 Release point.
4 * version.m4: Set to 2.31.1
5 * development.sh: Set to true.
6 * configure: Regenerate.
7 * po/bfd.pot: Regenerate.
8
9 2018-07-14 Nick Clifton <nickc (a] redhat.com>
10
11 * version.m4: Update to 2.31.0.
12 * development.sh: Set to true.
13 * configure: Regenerate.
14 * po/bfd.pot: Regenerate.
15
16 2018-07-14 Nick Clifton <nickc (a] redhat.com>
17
18 2.31 Release point.
19 * version.m4: Update to 2.31.
20 * development.sh: Set to false.
21 * configure: Regenerate.
22 * po/bfd.pot: Regenerate.
23
24 2018-07-03 Alan Modra <amodra (a] gmail.com>
25
26 PR 17550
27 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
28 in discarded sections.
29
30 2018-07-11 Max Filippov <jcmvbkbc (a] gmail.com>
31
32 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
33 space for dynamic relocation for undefined weak symbol.
34 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
35 relocation for undefined weak symbols.
36 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
37 section for relocations against undefined weak symbols.
38
39 2018-07-10 Maciej W. Rozycki <macro (a] mips.com>
40
41 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
42 to `remove_section'.
43
44 2018-07-09 H.J. Lu <hongjiu.lu (a] intel.com>
45
46 PR ld/23388
47 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
48 * configure: Regenerated.
49
50 2018-07-09 H.J. Lu <hongjiu.lu (a] intel.com>
51
52 PR ld/23372
53 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
54 ISA properties with empty bits.
55
56 2018-07-06 Alan Modra <amodra (a] gmail.com>
57
58 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
59 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
60 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
61 * elf32-s390.c (elf_s390_write_core_note): Likewise.
62 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
63 * elf64-s390.c (elf_s390_write_core_note): Likewise.
64 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
65
66 2018-07-05 Jim Wilson <jimw (a] sifive.com>
67
68 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
69 (riscv64*-*-*): Likewise.
70 (riscv-*-*): Add as an alias for riscv32*-*-*.
71
72 2018-07-05 Alan Modra <amodra (a] gmail.com>
73
74 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
75 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
76 on mismatch. Remove "warning: " from messages. Track last bfd
77 used to set tags.
78 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
79 _bfd_elf_ppc_merge_fp_attributes.
80 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
81 from _bfd_elf_ppc_merge_fp_attributes.
82
83 2018-07-03 Alan Modra <amodra (a] gmail.com>
84
85 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
86 sections.
87
88 2018-07-03 Alan Modra <amodra (a] gmail.com>
89
90 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
91 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
92 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
93 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
94 incompatible attribute.
95 (ppc_elf_merge_obj_attributes): Likewise. Return
96 _bfd_elf_merge_object_attributes result.
97 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
98 _bfd_elf_merge_object_attributes result.
99
100 2018-07-05 Nick Clifton <nickc (a] redhat.com>
101
102 * po/ru.po: Updated Russian translation.
103
104 2018-07-04 H.J. Lu <hongjiu.lu (a] intel.com>
105
106 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
107 * Makefile.in: Regenerated.
108
109 2018-07-04 H.J. Lu <hongjiu.lu (a] intel.com>
110
111 PR ld/23324
112 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
113 R_X86_64_converted_reloc_bit bit.
114
115 2018-06-26 Nick Clifton <nickc (a] redhat.com>
116
117 * po/uk.po: Updated Ukranian translation.
118
119 2018-06-25 Nick Clifton <nickc (a] redhat.com>
120
121 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
122 for malloc returning NULL.
123 (_bfd_aarch64_erratum_843419_fixup): Check for
124 _bfd_aarch64_erratum_835769_stub_name returning NULL.
125
126 2018-06-24 Nick Clifton <nickc (a] redhat.com>
127
128 * version.m4 (BFD_VERSION): Update to 2.30.90.
129 * configure: Regenerate.
130 * po/bfd.pot: Regenerate.
131
132 2018-06-24 Nick Clifton <nickc (a] redhat.com>
133
134 2.31 branch created.
135
136 2018-06-21 Maciej W. Rozycki <macro (a] mips.com>
137
138 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
139 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
140
141 2018-06-21 Maciej W. Rozycki <macro (a] mips.com>
142
143 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
144 EI_ABIVERSION setting together.
145
146 2018-06-21 Maciej W. Rozycki <macro (a] mips.com>
147
148 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
149 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
150 (MIPS_LIBC_ABI_MAX): New enumeration constants.
151 (_bfd_mips_post_process_headers): Use them in place of magic
152 numbers.
153
154 2018-06-21 Jim Wilson <jimw (a] sifive.com>
155
156 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
157 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
158
159 2018-06-21 Alan Modra <amodra (a] gmail.com>
160
161 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
162 * doc/Makefile.in: Regenerate.
163
164 2018-06-20 Renlin Li <renlin.li (a] arm.com>
165
166 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
167 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
168 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
169 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
170 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
171 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
172 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
173 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
174 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
175
176 2018-06-20 Nick Clifton <nickc (a] redhat.com>
177
178 PR 23316
179 * opncls.c (get_build_id): Check for a negative or excessive data
180 size in the build-id note.
181
182 2018-06-20 Nick Clifton <nickc (a] redhat.com>
183
184 PR 23299
185 * mach-o.c (cputype): New function.
186 (cpusubtype): New function.
187 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
188 values in the MACH-O file header.
189 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
190 cpusubtype fields from the input bfd's mach-o header to the output
191 bfd.
192 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
193 Redefine to bfd_mach_o_bfd_print_private_data.
194 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
195
196 2018-06-19 Maciej W. Rozycki <macro (a] mips.com>
197
198 PR ld/22966
199 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
200 `.got.plt' entry referred is in range.
201 (mips_finish_exec_plt): Correct the range check for `.got.plt'
202 start. Replace the assertion used for that with a proper error
203 message.
204
205 2018-06-19 Maciej W. Rozycki <macro (a] mips.com>
206
207 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
208 formatting.
209
210 2018-06-19 Simon Marchi <simon.marchi (a] ericsson.com>
211
212 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
213 (INCLUDES): Rename to ...
214 (AM_CPPFLAGS): ... this.
215 * configure.ac: Remove AC_PREREQ.
216 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
217 info-in-builddir no-texinfo.tex.
218 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
219 * doc/bfd.texinfo: Rename to ...
220 * doc/bfd.texi: ... this.
221 * Makefile.in: Re-generate.
222 * aclocal.m4: Re-generate.
223 * config.in: Re-generate.
224 * configure: Re-generate.
225 * doc/Makefile.in: Re-generate.
226
227 2018-06-18 Mephi <mephi42 (a] gmail.com>
228
229 PR 23297
230 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
231 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
232 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
233 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
234 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
235 * bfd-in2.h: Regenerate.
236 * libbfd.h: Regenerate.
237
238 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker (a] mips.com>
239
240 * elfxx-mips.c (print_mips_ases): Add GINV extension.
241
242 2018-06-14 H.J. Lu <hongjiu.lu (a] intel.com>
243
244 PR binutils/23267
245 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
246 symbol version is base version.
247
248 2018-06-14 Alan Modra <amodra (a] gmail.com>
249
250 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
251 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
252 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
253 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
254 "dynamic_relocs" is not set.
255 * elfxx-mips.c (count_section_dynsyms): Likewise.
256
257 2018-06-14 Alan Modra <amodra (a] gmail.com>
258
259 PR 23282
260 * bfdio.c (bfd_seek): Optimize away seeks to current position.
261
262 2018-06-13 Scott Egerton <scott.egerton (a] imgtec.com>
263 Faraz Shahbazker <Faraz.Shahbazker (a] mips.com>
264
265 * elfxx-mips.c (print_mips_ases): Add CRC.
266
267 2018-06-08 H.J. Lu <hongjiu.lu (a] intel.com>
268
269 PR ld/23161
270 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
271 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
272 __bss_start, _end and _edata in shared libraries.
273
274 2018-06-07 Alan Modra <amodra (a] gmail.com>
275
276 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
277 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
278
279 2018-06-05 Alan Modra <amodra (a] gmail.com>
280
281 * bfd.c (struct bfd): Update comment on "where" usage.
282 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
283 "iostream", and "where" from containing archive file. Return
284 error on NULL iovec.
285 (bfd_bread): Similarly, and return error attempted out of
286 bounds archive element access.
287 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
288 "where" from containing archive file.
289 (bfd_seek): Likewise. Return error on NULL iovec. Don't
290 attempt to optimize away seeks. Don't paper over errors by
291 calling bfd_tell.
292 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
293 (bfd_get_size): Likewise.
294 (bfd_mmap): Operate on and use iovec of containing archive
295 file. Return error on NULL iovec.
296 * cache.c (bfd_cache_lookup_worker): Abort if working on
297 archive element bfd.
298 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
299 Don't ignore zero byte reads.
300 (cache_bread): Look up FILE* in cache here. Error on NULL
301 lookup.
302 (cache_bwrite): Rename "where" to "from".
303 (cache_bmmap): Don't handle archive elements.
304 * coffcode.h (coff_slurp_line_table): Exit early on zero
305 lineno count.
306 * bfd-in2.h: Regenerate.
307
308 2018-06-05 Alan Modra <amodra (a] gmail.com>
309
310 PR 23254
311 * plugin.c (bfd_plugin_open_input): Allow for possibility of
312 nested archives. Open file again for plugin.
313 (try_claim): Don't save and restore file position. Close file
314 if not claimed.
315 * sysdep.h (O_BINARY): Define.
316
317 2018-06-04 Max Filippov <jcmvbkbc (a] gmail.com>
318
319 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
320 (compute_fill_extra_space): Drop declaration. Rename function to
321 xtensa_compute_fill_extra_space.
322 (compute_ebb_actions, remove_dead_literal): Update references to
323 compute_fill_extra_space.
324
325 2018-06-04 Volodymyr Arbatov <arbatov (a] cadence.com>
326
327 * elf32-xtensa.c (elf32xtensa_separate_props): New global
328 variable.
329 (xtensa_add_names): New function.
330 (xtensa_property_section_name): Add new parameter
331 separate_sections, use it to choose property section name.
332 (xtensa_get_separate_property_section): New function.
333 (xtensa_get_property_section): Invoke
334 xtensa_get_separate_property_section to get individual property
335 section if it exists, common property section otherwise.
336 (xtensa_make_property_section): Pass elf32xtensa_separate_props
337 to xtensa_property_section_name.
338
339 2018-06-04 H.J. Lu <hongjiu.lu (a] intel.com>
340
341 PR binutils/23146
342 * bfd-in.h: Include "diagnostics.h".
343 * bfd-in2.h: Regenerated.
344 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
345 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
346 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
347 -Wstringop-truncation.
348 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
349 * elf32-s390.c (elf_s390_write_core_note): Likewse.
350 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
351 * elf64-s390.c (elf_s390_write_core_note): Likewse.
352 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
353
354 2018-06-03 Jim Wilson <jimw (a] sifive.com>
355
356 PR ld/23244
357 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
358 for and handle an undefined weak with no PLT.
359
360 PR ld/22756
361 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
362 to code that ignores duplicate symbols.
363
364 2018-06-01 H.J. Lu <hongjiu.lu (a] intel.com>
365
366 * version.m4: Bump version to 2.30.52
367 * configure: Regenerated.
368
369 2018-06-01 Alan Modra <amodra (a] gmail.com>
370
371 * bfd.c (_bfd_error_handler): Arrange for this function to be
372 declared in bfd-in2.h.
373 * libbfd-in.h (_bfd_error_handler): Don't declare.
374 * libbfd.h: Regenerate.
375 * bfd-in2.h: Regenerate.
376
377 2018-05-30 Amaan Cheval <amaan.cheval (a] gmail.com>
378
379 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
380 This is needed to generate UEFI application image files from ELFs.
381
382 2018-05-28 H.J. Lu <hongjiu.lu (a] intel.com>
383
384 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
385 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
386 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
387 plt_tlsdesc_got2_insn_end for TLSDESC entry.
388 (elf_i386_lazy_ibt_plt): Likewise.
389 (elf_i386_nacl_plt): Likewise.
390 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
391 (elf_x86_64_tlsdesc_plt_entry): This.
392 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
393 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
394 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
395 plt_tlsdesc_got2_insn_end for TLSDESC entry.
396 (elf_x86_64_lazy_bnd_plt): Likewise.
397 (elf_x86_64_lazy_ibt_plt): Likewise.
398 (elf_x32_lazy_ibt_plt): Likewise.
399 (elf_x86_64_nacl_plt): Likewise.
400 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
401 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
402 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
403 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
404 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
405 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
406 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
407 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
408 (elf_x86_non_lazy_plt_layout): Update comments.
409 (elf_x86_plt_layout): Likewise.
410
411 2018-05-28 H.J. Lu <hongjiu.lu (a] intel.com>
412
413 PR ld/23238
414 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
415 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
416 (elf_backend_add_symbol_hook): Likewise.
417 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
418 (elf_backend_add_symbol_hook): Likewise.
419 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
420 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
421 (elf_backend_add_symbol_hook): Likewise.
422 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
423 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
424 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
425 (elf_backend_add_symbol_hook): Likewise.
426 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
427 handling.
428 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
429 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
430 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
431 * elflink.c (elf_link_add_object_symbols): Set
432 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
433
434 2018-05-26 H.J. Lu <hongjiu.lu (a] intel.com>
435
436 PR ld/23194
437 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
438 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
439 Extracted from _bfd_elf_link_assign_sym_version.
440 (_bfd_elf_link_hide_sym_by_version): New function.
441 (_bfd_elf_link_assign_sym_version): Use
442 _bfd_elf_link_hide_versioned_symbol.
443 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
444 _bfd_elf_link_hide_sym_by_version instead of
445 bfd_hide_sym_by_version. Don't check unversioned symbol.
446
447 2018-05-25 Alan Modra <amodra (a] gmail.com>
448
449 * Makefile.in: Regenerate.
450 * po/SRC-POTFILES.in: Regenerate.
451
452 2018-05-25 Alan Modra <amodra (a] gmail.com>
453
454 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
455 * configure: Regenerate.
456
457 2018-05-23 H.J. Lu <hongjiu.lu (a] intel.com>
458
459 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
460 to data.
461
462 2018-05-22 Alan Modra <amodra (a] gmail.com>
463
464 PR 23207
465 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
466 is NULL.
467 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
468 sections.
469 (final_link_relocate): Revert last change.
470
471 2018-05-22 Alan Modra <amodra (a] gmail.com>
472
473 PR 23207
474 * elf32-hppa.c (final_link_relocate): Don't look for plt call
475 stubs in non-alloc sections.
476
477 2018-05-21 H.J. Lu <hongjiu.lu (a] intel.com>
478
479 PR ld/23201
480 * aout-target.h (MY_bfd_link_hide_symbol): New.
481 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
482 * binary.c (binary_bfd_link_hide_symbol): Likewise.
483 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
484 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
485 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
486 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
487 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
488 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
489 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
490 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
491 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
492 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
493 (bfd_link_hide_symbol): Likewise.
494 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
495 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
496 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
497 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
498 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
499 * som.c (som_bfd_link_hide_symbol): Likewise.
500 * srec.c (srec_bfd_link_hide_symbol): Likewise.
501 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
502 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
503 (alpha_vms_bfd_link_hide_symbol): Likewise.
504 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
505 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
506 _bfd_generic_link_hide_symbol.
507 (rs6000_xcoff64_aix_vec): Likewise.
508 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
509 local symbol dynamic.
510 (_bfd_elf_link_hide_symbol): New function.
511 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
512 check root.ldscript_def.
513 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
514 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
515 * bfd-in2.h: Regenerated.
516 * libbfd.h: Likewise.
517
518 2018-05-21 H.J. Lu <hongjiu.lu (a] intel.com>
519
520 PR binutils/23199
521 * elf.c (setup_group): Mark section in a section group with
522 SHF_GROUP.
523
524 2018-05-18 H.J. Lu <hongjiu.lu (a] intel.com>
525
526 PR ld/23194
527 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
528 set eh->local_ref to 1 if a symbol is versioned and there is a
529 version script.
530
531 2018-05-18 Kito Cheng <kito.cheng (a] gmail.com>
532
533 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
534 EF_RISCV_RVE.
535
536 2018-05-18 Jim Wilson <jimw (a] sifive.com>
537
538 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
539 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
540 (riscv_elf_relocate_section): Don't generate dynamic relocation if
541 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
542 (riscv_elf_finish_dynamic_symbol): Likewise.
543
544 2018-05-18 John Darrington <john (a] darrington.wattle.id.au>
545
546 * Makefile.am: Add s12z files.
547 * Makefile.in: Regenerate.
548 * archures.c: Add bfd_s12z_arch.
549 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
550 * bfd-in2.h: Regenerate.
551 * config.bfd: Add s12z target.
552 * configure.ac: Add s12z target.
553 * configure: Regenerate.
554 * cpu-s12z.c: New file.
555 * elf32-s12z.c: New file.
556 * libbfd.c (bfd_putb24): New function.
557 (bfd_putl24): New function.
558 * libbfd.h: Regenerate.
559 * reloc.c: Add s12z relocations.
560 (bfd_get_reloc_size): Handle size 5 relocs.
561 * targets.c: Add s12z_elf32_vec.
562
563 2018-05-18 H.J. Lu <hongjiu.lu (a] intel.com>
564
565 PR ld/23189
566 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
567 like R_386_GOT32.
568 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
569 set eh->local_ref to 1 for linker defined symbols.
570
571 2018-05-18 Alan Modra <amodra (a] gmail.com>
572
573 PR 23199
574 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
575 don't point at other SHT_GROUP sections. Set shdr corresponding
576 to invalid entry, to NULL rather than section 0. Identify
577 SHT_GROUP section index when reporting an error. Cope with NULL
578 shdr pointer.
579
580 2018-05-18 Alan Modra <amodra (a] gmail.com>
581
582 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
583 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
584 visibility.
585 * libbfd.h: Regenerate.
586 * configure: Regenerate.
587 * config.in: Regenerate.
588
589 2018-05-18 Alan Modra <amodra (a] gmail.com>
590
591 * libbfd-in.h: Add include guard.
592 * libcoff-in.h: Likewise.
593 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
594 * doc/Makefile.in: Regenerate.
595 * libbfd.h: Regenerate.
596 * libcoff.h: Regenerate.
597
598 2018-05-16 Maciej W. Rozycki <macro (a] mips.com>
599
600 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
601
602 2018-05-16 Alan Modra <amodra (a] gmail.com>
603
604 PR 22458
605 * format.c (struct bfd_preserve): Add section_id.
606 (bfd_preserve_save, bfd_preserve_restore): Save and restore
607 _bfd_section_id.
608 (bfd_reinit): Set _bfd_section_id.
609 (bfd_check_format_matches): Put all matches of any priority into
610 matching_vector. Save initial section id and start each attempted
611 match at that section id.
612 * libbfd-in.h (_bfd_section_id): Declare.
613 * section.c (_bfd_section_id): Rename from section_id and make
614 global. Adjust uses.
615 (bfd_get_next_section_id): Delete.
616 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
617 bfd_get_section_id with _bfd_section_id.
618 * libbfd.h: Regenerate.
619 * bfd-in2.h: Regenerate.
620
621 2018-05-15 Christophe Guillon <christophe.guillon (a] st.com>
622
623 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
624 of the aux structure are initialised.
625
626 2018-05-15 Francois H. Theron <francois.theron (a] netronome.com>
627
628 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
629
630 2018-05-15 Nick Clifton <nickc (a] redhat.com>
631
632 * po/pt.po: New Portuguese translation.
633 * configure.ac (ALL_LINGUAS): Add pt.
634 * configure: Regenerate.
635
636 2018-05-14 H.J. Lu <hongjiu.lu (a] intel.com>
637
638 PR ld/23169
639 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
640 an error on IFUNC pointer defined in PDE.
641 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
642 _bfd_x86_elf_link_fixup_ifunc_symbol.
643 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
644 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
645 function.
646 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
647
648 2018-05-14 H.J. Lu <hongjiu.lu (a] intel.com>
649
650 PR ld/23162
651 * elfxx-x86.c (elf_x86_linker_defined): New function.
652 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
653 _end and _edata locally defined within executables.
654
655 2018-05-12 Alan Modra <amodra (a] gmail.com>
656
657 PR 20659
658 * elf.c (rewrite_elf_program_header): Use segment_mark only for
659 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
660 Instead make matching_lma and suggested_lma pointers to the
661 sections. Align section vma and lma calculated from segment.
662 Don't clear includes_phdrs or includes_filehdr based on p_paddr
663 test. Try to handle alignment padding before first section by
664 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
665
666 2018-05-09 Dimitar Dimitrov <dimitar (a] dinux.eu>
667
668 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
669 conformant to TI ABI.
670 (pru_elf32_relax_section): Likewise.
671 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
672 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
673 (pru_elf32_pmem_relocate): Trap - should not get here.
674 (pru_elf32_relocate_section): Add support for REL relocations.
675 (elf_info_to_howto_rel): Enable REL.
676 (elf_backend_may_use_rel_p): Likewise.
677 (elf_backend_may_use_rela_p): Likewise.
678 (elf_backend_default_use_rela_p): Likewise.
679
680 2018-05-09 Alan Modra <amodra (a] gmail.com>
681
682 PR 23148
683 * peXXigen.c (pe_print_edata): Correct minimum size.
684
685 2018-05-09 Alan Modra <amodra (a] gmail.com>
686
687 PR 23147
688 * peXXigen.c (pe_print_idata): Bound check hint_addr.
689
690 2018-05-08 Nick Clifton <nickc (a] redhat.com>
691
692 PR 22809
693 * elf.c (bfd_elf_get_str_section): Check for an excessively large
694 string section.
695 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
696 attribute section is larger than the size of the file.
697
698 2018-05-07 Alan Modra <amodra (a] gmail.com>
699
700 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
701 strncmp when checking for ".bf" special symbol.
702 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
703 section name a char array, remove sentinal known_sections entry,
704 and adjust loop over known_sections to suit. Use memcmp rather
705 than strncmp.
706
707 2018-05-04 Alan Modra <amodra (a] gmail.com>
708
709 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
710 (struct elf_external_linux_prpsinfo32_ugid16),
711 (struct elf_external_linux_prpsinfo64_ugid32),
712 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
713 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
714 Move comment to..
715 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
716 directives.
717 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
718 to data.
719 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
720 * elf32-s390.c (elf_s390_write_core_note): Likewise.
721 * elf64-s390.c (elf_s390_write_core_note): Likewise.
722 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
723 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
724 pragmas.
725 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
726 false positive gcc-8 warning.
727 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
728
729 2018-05-04 Tulio Magno Quites Machado Filho <tuliom (a] linux.ibm.com>
730
731 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
732 of arguments when warning about different long double types.
733
734 2018-05-03 Simon Atanasyan <simon (a] atanasyan.com>
735
736 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
737 (elf_backend_fixup_symbol): New macro.
738 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
739 handling.
740 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
741
742 2018-04-30 Francois H. Theron <francois.theron (a] netronome.com>
743
744 * Makefile.am: Added NFP files to build.
745 * archures.c: Added bfd_arch_nfp
746 * config.bfd: Added NFP support.
747 * configure.ac: Added NFP support.
748 * cpu-nfp.c: New, for NFP support.
749 * elf-bfd.h: Added elf_section_info()
750 * elf64-nfp.c: New, for NFP support.
751 * po/SRC-POTFILES.in: Added NFP source files.
752 * targets.c: Added nfp_elf64_vec
753 * bfd-in2.h: Regenerate.
754 * Makefile.in: Regenerate.
755 * configure: Regenerate.
756
757 2018-04-27 Alan Modra <amodra (a] gmail.com>
758
759 * bfd-in2.h: Regenerate.
760 * libbfd.h: Regenerate.
761
762 2018-04-27 Alan Modra <amodra (a] gmail.com>
763
764 PR 23123
765 PR 22374
766 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
767 relocs for ifuncs.
768 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
769
770 2018-04-26 Pedro Alves <palves (a] redhat.com>
771
772 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
773 ifunc and non-ifunc symbols duplicates.
774
775 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
776 Mickal Gun <mickael.guene (a] st.com>
777
778 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
779 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
780 (elf32_arm_populate_plt_entry): Likewise.
781 (elf32_arm_output_plt_map_1): Likewise.
782 (elf32_arm_output_arch_local_syms): Likewise.
783
784 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
785 Mickal Gun <mickael.guene (a] st.com>
786
787 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
788 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
789
790 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
791 Mickal Gun <mickael.guene (a] st.com>
792
793 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
794 for R_ARM_TARGET2.
795
796 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
797 Mickal Gun <mickael.guene (a] st.com>
798
799 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
800 (elf32_arm_always_size_sections): Create stack segment.
801
802 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
803 Mickal Gun <mickael.guene (a] st.com>
804
805 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
806 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
807 relocations.
808 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
809 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
810 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
811 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
812 (struct elf32_arm_link_hash_table): Update comment.
813 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
814 (IS_ARM_TLS_RELOC): Likewise.
815 (elf32_arm_check_relocs): Likewise.
816 (allocate_dynrelocs_for_symbol): Likewise.
817 (elf32_arm_size_dynamic_sections): Update comment.
818 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
819 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
820
821 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
822 Mickal Gun <mickael.guene (a] st.com>
823
824 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
825 (elf32_arm_create_dynamic_sections): Handle FDPIC.
826 (elf32_arm_allocate_plt_entry): Likewise.
827 (elf32_arm_populate_plt_entry): Likewise.
828 (elf32_arm_output_plt_map_1): Likewise.
829
830 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
831 Mickal Gun <mickael.guene (a] st.com>
832
833 * elf32-arm.c (struct fdpic_local): New.
834 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
835 (elf32_arm_local_fdpic_cnts): New.
836 (struct fdpic_global): New.
837 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
838 (elf32_arm_link_hash_table): Add srofixup field.
839 (arm_elf_add_rofixup): New.
840 (arm_elf_fill_funcdesc): New.
841 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
842 (elf32_arm_allocate_local_sym_info): Likewise.
843 (create_got_section): Create .rofixup section.
844 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
845 (bfd_elf32_arm_set_target_params): Handle FDPIC.
846 (elf32_arm_final_link_relocate): Likewise.
847 (elf32_arm_check_relocs): Likewise.
848 (allocate_dynrelocs_for_symbol): Likewise.
849 (elf32_arm_size_dynamic_sections): Likewise.
850 (elf32_arm_finish_dynamic_sections): Likewise.
851 (elf32_arm_output_arch_local_syms): Likewise.
852 (elf32_arm_fdpic_omit_section_dynsym): New.
853
854 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
855 Mickal Gun <mickael.guene (a] st.com>
856
857 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
858 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
859 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
860 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
861 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
862 (elf32_arm_howto_from_type): Take new members of
863 elf32_arm_howto_table_2 into account.
864 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
865 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
866 BFD_RELOC_ARM_FUNCDESC_VALUE.
867 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
868 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
869 BFD_RELOC_ARM_FUNCDESC_VALUE.
870
871 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
872 Mickal Gun <mickael.guene (a] st.com>
873
874 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
875 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
876 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
877 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
878
879 2018-04-25 Christophe Lyon <christophe.lyon (a] st.com>
880 Mickal Gun <mickael.guene (a] st.com>
881
882 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
883 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
884 arm*-*-uclinuxfdpiceabi.
885 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
886 arm_elf32_fdpic_le_vec.
887 * configure: Regenerate.
888 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
889 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
890 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
891 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
892 (elf32_arm_fdpic_link_hash_table_create): New.
893 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
894 arm_elf32_fdpic_le_vec.
895
896 2018-04-25 Alan Modra <amodra (a] gmail.com>
897
898 * elf-linux-core.h: Disable gcc-8 string truncation warning.
899 * elf.c (elfcore_write_prpsinfo): Likewise.
900
901 2018-04-25 Alan Modra <amodra (a] gmail.com>
902
903 * Makefile.am: Remove arm-aout and arm-coff support.
904 * config.bfd: Likewise.
905 * configure.ac: Likewise.
906 * targets.c: Likewise.
907 * aout-arm.c: Delete.
908 * armnetbsd.c: Delete.
909 * riscix.c: Delete.
910 * Makefile.in: Regenerate.
911 * configure: Regenerate.
912 * po/SRC-POTFILES.in: Regenerate.
913
914 2018-04-24 Nick Clifton <nickc (a] redhat.com>
915
916 PR 23113
917 * elf.c (ignore_section_sym): Check for the output_section pointer
918 being NULL before dereferencing it.
919
920 PR 23110
921 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
922 a negative PE_DEBUG_DATA size before iterating over the debug data.
923
924 2018-04-23 Alan Modra <amodra (a] gmail.com>
925
926 * elf-linux-core.h: Revert last change.
927 * elf.c: Likewise.
928
929 2018-04-23 Nick Clifton <nickc (a] redhat.com>
930
931 PR 23056
932 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
933 the end of the string table, and zero it.
934
935 2018-04-23 Alan Modra <amodra (a] gmail.com>
936
937 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
938 gcc-8 string truncation warning.
939 (swap_linux_prpsinfo32_ugid16_out): Likewise.
940 (swap_linux_prpsinfo64_ugid32_out): Likewise.
941 (swap_linux_prpsinfo64_ugid16_out): Likewise.
942 * elf.c (elfcore_write_prpsinfo): Likewise.
943
944 2018-04-23 Nick Clifton <nickc (a] redhat.com>
945
946 PR 23056
947 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
948 the end of the string table, and zero it.
949
950 2018-04-20 Alan Modra <amodra (a] gmail.com>
951
952 PR 22978
953 * elf32-hppa.c (got_relocs_needed): Add extra param to special
954 case both dtprel and tprel relocs.
955 (allocate_dynrelocs): Adjust conditions for got relocs.
956 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
957 Emit dynamic relocs on TLS GOT entries for shared libraries,
958 not when pic. Omit dynamic reloc on dtprel entry when local,
959 and on tprel entry when local and executable.
960
961 2018-04-19 Alan Modra <amodra (a] gmail.com>
962
963 PR 22537
964 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
965 (hppa_type_of_stub): Don't return a long branch stub for
966 symbols other than those defined statically.
967
968 2018-04-19 Alan Modra <amodra (a] gmail.com>
969
970 * Makefile.am: Revert 2018-04-18 coff-mips changes.
971 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
972 to selvecs for mips targets change 2018-04-18.
973 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
974 and mips_ecoff_bele_vec.
975 * targets.c: Likewise.
976 * coff-mips.c: Resurrect.
977 * Makefile.in: Regenerate.
978 * configure: Regenerate.
979 * po/SRC-POTFILES.in: Regenerate.
980
981 2018-04-18 Alan Modra <amodra (a] gmail.com>
982
983 * Makefile.am: Remove mips aout and coff support.
984 * config.bfd: Likewise.
985 * configure.ac: Likewise.
986 * targets.c: Likewise.
987 * coff-mips.c: Delete
988 * mipsbsd.c: Delete
989 * pe-mips.c: Delete
990 * pei-mips.c: Delete
991 * Makefile.in: Regenerate.
992 * configure: Regenerate.
993 * po/SRC-POTFILES.in: Regenerate.
994
995 2018-04-17 H.J. Lu <hongjiu.lu (a] intel.com>
996
997 * elf32-i386.c (elf32_bed): Define before including
998 "elf32-target.h".
999 * elf64-x86-64.c (elf64_bed): Define before including
1000 "elf64-target.h".
1001 (elf32_bed): Define before including "elf32-target.h".
1002
1003 2018-04-17 H.J. Lu <hongjiu.lu (a] intel.com>
1004
1005 PR ld/23055
1006 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1007 normal input file with compatible relocation.
1008
1009 2018-04-18 Alan Modra <amodra (a] gmail.com>
1010
1011 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1012 * config.bfd: Likewise.
1013 * configure.ac: Likewise.
1014 * doc/bfdint.texi: Likewise.
1015 * targets.c: Likewise.
1016 * freebsd.h: Delete.
1017 * i386dynix.c: Delete.
1018 * i386freebsd.c: Delete.
1019 * i386linux.c: Delete.
1020 * i386mach3.c: Delete.
1021 * i386netbsd.c: Delete.
1022 * i386os9k.c: Delete.
1023 * Makefile.in: Regenerate.
1024 * configure: Regenerate.
1025 * po/SRC-POTFILES.in: Regenerate.
1026
1027 2018-04-17 Andrew Sadek <andrew.sadek.se (a] gmail.com>
1028
1029 Microblaze Target: PIC data text relative
1030
1031 * bfd/reloc.c (2 new BFD relocations):
1032 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1033 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1034 * bfd/bfd-in2.h: Regenerate
1035 * bfd/libbfd.h: Regenerate
1036 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1037 new relocs and handle them in both relocate and relax functions.
1038 (microblaze_elf_reloc_type_lookup): add mapping between for new
1039 bfd relocs.
1040 (microblaze_elf_relocate_section): Handle new relocs in case of
1041 elf relocation.
1042 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1043
1044 2018-04-17 Nick Clifton <nickc (a] redhat.com>
1045
1046 PR 23055
1047 * aoutx.h (find_nearest_line): Check that the symbol name exists
1048 and is long enough, before attempting to see if it is for a .o
1049 file.
1050 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1051 NULL.
1052 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1053 NULL.
1054 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1055 has no name.
1056
1057 PR 23065
1058 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1059
1060 2018-04-16 Nick Clifton <nickc (a] redhat.com>
1061
1062 PR 23061
1063 * coffgen.c (coff_pointerize_aux): Check for an out of range
1064 fixup.
1065
1066 2018-04-16 Alan Modra <amodra (a] gmail.com>
1067
1068 * Makefile.am: Remove arm-epoc-pe support.
1069 * coff-arm.c: Likewise.
1070 * config.bfd: Likewise.
1071 * configure.ac: Likewise.
1072 * targets.c: Likewise.
1073 * epoc-pe-arm.c: Delete.
1074 * epoc-pei-arm.c: Delete.
1075 * Makefile.in: Regenerate.
1076 * configure: Regenerate.
1077 * po/SRC-POTFILES.in: Regenerate.
1078
1079 2018-04-16 Alan Modra <amodra (a] gmail.com>
1080
1081 * Makefile.am: Remove sparc-aout and sparc-coff support.
1082 * config.bfd: Likewise.
1083 * configure.ac: Likewise.
1084 * targets.c: Likewise.
1085 * aout-sparcle.c: Delete.
1086 * aoutf1.h: Delete.
1087 * cf-sparclynx.c: Delete.
1088 * coff-sparc.c: Delete.
1089 * demo64.c: Delete.
1090 * sparclinux.c: Delete.
1091 * sparclynx.c: Delete.
1092 * sparcnetbsd.c: Delete.
1093 * sunos.c: Delete.
1094 * Makefile.in: Regenerate.
1095 * configure: Regenerate.
1096 * po/SRC-POTFILES.in: Regenerate.
1097
1098 2018-04-16 Alan Modra <amodra (a] gmail.com>
1099
1100 * Makefile.am: Remove m68k-aout and m68k-coff support.
1101 * aoutf1.h: Likewise.
1102 * aoutx.h: Likewise.
1103 * archive.c: Likewise.
1104 * bfd-in.h: Likewise.
1105 * bfd.c: Likewise.
1106 * coffcode.h: Likewise.
1107 * coffswap.h: Likewise.
1108 * config.bfd: Likewise.
1109 * configure.ac: Likewise.
1110 * configure.host: Likewise.
1111 * doc/bfd.texinfo: Likewise.
1112 * doc/bfdint.texi: Likewise.
1113 * freebsd.h: Likewise.
1114 * gen-aout.c: Likewise.
1115 * hpux-core.c: Likewise.
1116 * libaout.h: Likewise.
1117 * libbfd-in.h: Likewise.
1118 * pdp11.c: Likewise.
1119 * peicode.h: Likewise.
1120 * riscix.c: Likewise.
1121 * targets.c: Likewise.
1122 * aout0.c: Delete.
1123 * coff-apollo.c: Delete.
1124 * coff-aux.c: Delete.
1125 * coff-m68k.c: Delete.
1126 * coff-svm68k.c: Delete.
1127 * coff-u68k.c: Delete.
1128 * hosts/delta68.h: Delete.
1129 * hosts/hp300bsd.h: Delete.
1130 * hosts/m68kaux.h: Delete.
1131 * hosts/news.h: Delete.
1132 * hp300bsd.c: Delete.
1133 * hp300hpux.c: Delete.
1134 * liboasys.h: Delete.
1135 * m68k4knetbsd.c: Delete.
1136 * m68klinux.c: Delete.
1137 * m68knetbsd.c: Delete.
1138 * oasys.c: Delete.
1139 * versados.c: Delete.
1140 * Makefile.in: Regenerate.
1141 * bfd-in2.h: Regenerate.
1142 * configure: Regenerate.
1143 * libbfd.h: Regenerate.
1144 * po/SRC-POTFILES.in: Regenerate.
1145
1146 2018-04-16 Alan Modra <amodra (a] gmail.com>
1147
1148 * Makefile.am: Remove sh5 and sh64 support.
1149 * archures.c: Likewise.
1150 * config.bfd: Likewise.
1151 * configure.ac: Likewise.
1152 * cpu-sh.c: Likewise.
1153 * elf32-sh-relocs.h: Likewise.
1154 * elf32-sh.c: Likewise.
1155 * targets.c: Likewise.
1156 * elf32-sh64-com.c: Delete.
1157 * elf32-sh64.c: Delete.
1158 * elf32-sh64.h: Delete.
1159 * elf64-sh64.c: Delete.
1160 * Makefile.in: Regenerate.
1161 * bfd-in2.h: Regenerate.
1162 * configure: Regenerate.
1163 * po/SRC-POTFILES.in: Regenerate.
1164
1165 2018-04-16 Alan Modra <amodra (a] gmail.com>
1166
1167 * Makefile.am: Remove sh-symbianelf support.
1168 * config.bfd: Likewise.
1169 * configure.ac: Likewise.
1170 * targets.c: Likewise.
1171 * elf32-sh-symbian.c: Delete.
1172 * Makefile.in: Regenerate.
1173 * configure: Regenerate.
1174 * po/SRC-POTFILES.in: Regenerate.
1175
1176 2018-04-16 Alan Modra <amodra (a] gmail.com>
1177
1178 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1179 * config.bfd: Likewise.
1180 * configure.ac: Likewise.
1181 * targets.c: Likewise.
1182 * vaxbsd.c: Delete.
1183 * Makefile.in: Regenerate.
1184 * configure: Regenerate.
1185 * po/SRC-POTFILES.in: Regenerate.
1186
1187 2018-04-16 Alan Modra <amodra (a] gmail.com>
1188
1189 * Makefile.am: Remove w65 support.
1190 * archures.c: Likewise.
1191 * coffcode.h: Likewise.
1192 * config.bfd: Likewise.
1193 * configure.ac: Likewise.
1194 * targets.c: Likewise.
1195 * coff-w65.c: Delete.
1196 * cpu-w65.c: Delete.
1197 * Makefile.in: Regenerate.
1198 * bfd-in2.h: Regenerate.
1199 * configure: Regenerate.
1200 * po/SRC-POTFILES.in: Regenerate.
1201
1202 2018-04-16 Alan Modra <amodra (a] gmail.com>
1203
1204 * Makefile.am: Remove we32k support.
1205 * archures.c: Likewise.
1206 * coffcode.h: Likewise.
1207 * config.bfd: Likewise.
1208 * configure.ac: Likewise.
1209 * targets.c: Likewise.
1210 * coff-we32k.c: Delete.
1211 * cpu-we32k.c: Delete.
1212 * Makefile.in: Regenerate.
1213 * bfd-in2.h: Regenerate.
1214 * configure: Regenerate.
1215 * po/SRC-POTFILES.in: Regenerate.
1216
1217 2018-04-16 Alan Modra <amodra (a] gmail.com>
1218
1219 * Makefile.am: Remove m88k support.
1220 * aoutx.h: Likewise.
1221 * archures.c: Likewise.
1222 * coffcode.h: Likewise.
1223 * coffswap.h: Likewise.
1224 * config.bfd: Likewise.
1225 * configure.ac: Likewise.
1226 * cpu-ns32k.c: Likewise.
1227 * elf32-nds32.c: Likewise.
1228 * mach-o.c: Likewise.
1229 * netbsd-core.c: Likewise.
1230 * reloc.c: Likewise.
1231 * targets.c: Likewise.
1232 * coff-m88k.c: Delete.
1233 * cpu-m88k.c: Delete.
1234 * elf32-m88k.c: Delete.
1235 * hosts/m88kmach3.h: Delete.
1236 * m88kmach3.c: Delete.
1237 * m88kopenbsd.c: Delete.
1238 * Makefile.in: Regenerate.
1239 * bfd-in2.h: Regenerate.
1240 * configure: Regenerate.
1241 * po/SRC-POTFILES.in: Regenerate.
1242
1243 2018-04-16 Alan Modra <amodra (a] gmail.com>
1244
1245 * Makefile.am: Remove i370 support.
1246 * archures.c: Likewise.
1247 * config.bfd: Likewise.
1248 * configure.ac: Likewise.
1249 * targets.c: Likewise.
1250 * cpu-i370.c: Delete.
1251 * elf32-i370.c: Delete.
1252 * Makefile.in: Regenerate.
1253 * bfd-in2.h: Regenerate.
1254 * configure: Regenerate.
1255 * po/SRC-POTFILES.in: Regenerate.
1256
1257 2018-04-16 Alan Modra <amodra (a] gmail.com>
1258
1259 * Makefile.am: Remove h8500 support.
1260 * archures.c: Likewise.
1261 * coffcode.h: Likewise.
1262 * config.bfd: Likewise.
1263 * configure.ac: Likewise.
1264 * targets.c: Likewise.
1265 * coff-h8500.c: Delete.
1266 * cpu-h8500.c: Delete.
1267 * Makefile.in: Regenerate.
1268 * bfd-in2.h: Regenerate.
1269 * configure: Regenerate.
1270 * po/SRC-POTFILES.in: Regenerate.
1271
1272 2018-04-16 Alan Modra <amodra (a] gmail.com>
1273
1274 * Makefile.am: Remove h8300-coff support.
1275 * coffcode.h: Likewise.
1276 * config.bfd: Likewise.
1277 * configure.ac: Likewise.
1278 * reloc16.c: Likewise.
1279 * targets.c: Likewise.
1280 * coff-h8300.c: Delete.
1281 * Makefile.in: Regenerate.
1282 * configure: Regenerate.
1283 * po/SRC-POTFILES.in: Regenerate.
1284
1285 2018-04-16 Alan Modra <amodra (a] gmail.com>
1286
1287 * Makefile.am: Remove IEEE 695 support.
1288 * archures.c: Likewise.
1289 * bfd.c: Likewise.
1290 * config.bfd: Likewise.
1291 * configure.ac: Likewise.
1292 * doc/bfd.texinfo: Likewise.
1293 * doc/bfdint.texi: Likewise.
1294 * doc/bfdsumm.texi: Likewise.
1295 * section.c: Likewise.
1296 * targets.c: Likewise.
1297 * ieee.c: Delete.
1298 * libieee.h: Delete.
1299 * Makefile.in: Regenerate.
1300 * bfd-in2.h: Regenerate.
1301 * configure: Regenerate.
1302 * po/SRC-POTFILES.in: Regenerate.
1303
1304 2018-04-16 Alan Modra <amodra (a] gmail.com>
1305
1306 * config.bfd: Remove tandem support.
1307
1308 2018-04-16 Alan Modra <amodra (a] gmail.com>
1309
1310 * Makefile.am: Remove newsos3 support.
1311 * aoutx.h: Likewise.
1312 * config.bfd: Likewise.
1313 * configure.ac: Likewise.
1314 * targets.c: Likewise.
1315 * newsos3.c: Delete.
1316 * Makefile.in: Regenerate.
1317 * configure: Regenerate.
1318 * po/SRC-POTFILES.in: Regenerate.
1319
1320 2018-04-16 Alan Modra <amodra (a] gmail.com>
1321
1322 * Makefile.am: Remove netware support.
1323 * bfd-in.h: Likewise.
1324 * bfd.c: Likewise.
1325 * config.bfd: Likewise.
1326 * configure.ac: Likewise.
1327 * doc/bfdint.texi: Likewise.
1328 * ecoff.c: Likewise.
1329 * targets.c: Likewise.
1330 * libnlm.h: Delete.
1331 * nlm-target.h: Delete.
1332 * nlm.c: Delete.
1333 * nlm32-alpha.c: Delete.
1334 * nlm32-i386.c: Delete.
1335 * nlm32-ppc.c: Delete.
1336 * nlm32-sparc.c: Delete.
1337 * nlm32.c: Delete.
1338 * nlm64.c: Delete.
1339 * nlmcode.h: Delete.
1340 * nlmswap.h: Delete.
1341 * Makefile.in: Regenerate.
1342 * bfd-in2.h: Regenerate.
1343 * configure: Regenerate.
1344 * po/SRC-POTFILES.in: Regenerate.
1345
1346 2018-04-16 Alan Modra <amodra (a] gmail.com>
1347
1348 * archures.c: Remove tahoe support.
1349 * config.bfd: Likewise.
1350 * configure.ac: Likewise.
1351 * hosts/tahoe.h: Delete.
1352 * bfd-in2.h: Regenerate.
1353 * configure: Regenerate.
1354
1355 2018-04-14 Alan Modra <amodra (a] gmail.com>
1356
1357 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1358 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1359 sanity test.
1360 (elfNN_bed): Init relropagesize.
1361 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1362 select relropagesize.
1363 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1364 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1365 (ELF_MINPAGESIZE): Don't define.
1366 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1367 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1368 * bfd-in2.h: Regenerate.
1369
1370 2018-04-14 Alan Modra <amodra (a] gmail.com>
1371
1372 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1373 on __QNXTARGET__ define.
1374
1375 2018-04-14 Alan Modra <amodra (a] gmail.com>
1376
1377 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1378 to obsolete list.
1379
1380 2018-04-11 Alan Modra <amodra (a] gmail.com>
1381
1382 * aout-adobe.c: Delete.
1383 * bout.c: Delete.
1384 * coff-i860.c: Delete.
1385 * coff-i960.c: Delete.
1386 * cpu-i860.c: Delete.
1387 * cpu-i960.c: Delete.
1388 * elf32-i860.c: Delete.
1389 * elf32-i960.c: Delete.
1390 * hosts/i860mach3.h: Delete.
1391 * Makefile.am: Remove i860, i960, bout, and adobe support.
1392 * archures.c: Remove i860 and i960 support.
1393 * coffcode.h: Likewise.
1394 * reloc.c: Likewise.
1395 * aoutx.h: Comment updates.
1396 * archive.c: Remove BOUT and i960 support.
1397 * bfd.c: Remove BOUT support.
1398 * coffswap.h: Remove i960 support.
1399 * config.bfd: Remove i860, i960 and adobe targets.
1400 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1401 * targets.c: Likewise.
1402 * ieee.c: Remove i960 support.
1403 * mach-o.c: Remove i860 support.
1404 * Makefile.in: Regenerate.
1405 * bfd-in2.h: Regenerate.
1406 * configure: Regenerate.
1407 * libbfd.h: Regenerate.
1408 * po/SRC-POTFILES.in: Regenerate.
1409
1410 2018-04-09 Maciej W. Rozycki <macro (a] mips.com>
1411
1412 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1413 in the BFD symbol referred by the relocation.
1414 (mips_elf64_write_rela): Likewise.
1415
1416 2018-04-09 Maciej W. Rozycki <macro (a] mips.com>
1417
1418 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1419 error for out-of-range `r_sym' values.
1420
1421 2018-04-09 Alan Modra <amodra (a] gmail.com>
1422
1423 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1424 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1425 (ppc64_elf_check_relocs): Set has_pltcall.
1426 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1427 (ppc64_elf_inline_plt): New function.
1428 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1429 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1430 * elf32-ppc.c (has_pltcall): Define.
1431 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1432 (ppc_elf_check_relocs): Set has_pltcall.
1433 (ppc_elf_inline_plt): New function.
1434 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1435 (ppc_elf_size_dynamic_sections): Likewise.
1436 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1437
1438 2018-04-09 Alan Modra <amodra (a] gmail.com>
1439
1440 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1441 (is_plt_seq_reloc): New function.
1442 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1443 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1444 (ppc_elf_relax_section): Handle PLTCALL reloc.
1445 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1446 resolving locally.
1447 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1448 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1449 (has_tls_get_addr_call): Correct comment.
1450 (is_branch_reloc): Add PLTCALL.
1451 (is_plt_seq_reloc): New function.
1452 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1453 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1454 entry for R_PPC64_PLTCALL.
1455 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1456 (ppc_type_of_stub): Handle PLTCALL reloc.
1457 (toc_adjusting_stub_needed): Likewise.
1458 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1459 reloc insn. Nop out inline plt call sequence when resolving
1460 locally. Handle __tls_get_addr inline plt call optimization.
1461
1462 2018-04-09 Alan Modra <amodra (a] gmail.com>
1463
1464 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1465 (struct ppc_stub_hash_entry): Add symtype field.
1466 (PLT_KEEP): Define.
1467 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1468 (create_linkage_sections): Create pltlocal and relpltlocal.
1469 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1470 Set PLT_KEEP.
1471 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1472 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1473 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1474 Keep PLT entries for inline calls against locals.
1475 (ppc_build_one_stub): Use pltlocal as appropriate.
1476 (ppc_size_one_stub): Likewise.
1477 (ppc64_elf_size_stubs): Set symtype.
1478 (build_global_entry_stubs_and_plt): Init pltlocal and write
1479 relpltlocal for globals.
1480 (write_plt_relocs_for_local_syms): Likewise for local syms.
1481 (ppc64_elf_relocate_section): Support PLT for local syms.
1482 * elf32-ppc.c (PLT_KEEP): Define.
1483 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1484 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1485 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1486 Set PLT_KEEP. Adjust update_local_sym_info call.
1487 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1488 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1489 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1490 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1491 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1492 (ppc_finish_symbols): Likewise for locals.
1493
1494 2018-04-09 Alan Modra <amodra (a] gmail.com>
1495
1496 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1497 for local symbols to..
1498 (write_plt_relocs_for_local_syms): ..here. New function.
1499 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1500 global symbols to..
1501 (build_global_entry_stubs_and_plt): ..here. Rename from
1502 build_global_entry_stubs.
1503 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1504 Call write_plt_relocs_for_local_syms.
1505 * elf32-ppc.c (get_sym_h): New function.
1506 (ppc_elf_relax_section): Use get_sym_h.
1507 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1508 stubs for local symbols to..
1509 (ppc_finish_symbols): ..here. New function.
1510 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1511 global syms to..
1512 (write_global_sym_plt): ..here. New function.
1513 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1514 (ppc_finish_symbols): Declare.
1515
1516 2018-04-09 Alan Modra <amodra (a] gmail.com>
1517
1518 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1519 (ppc_elf_relocate_section): Likewise.
1520 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1521 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1522 resolution to plt entry relative to toc pointer.
1523
1524 2018-04-09 Alan Modra <amodra (a] gmail.com>
1525
1526 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1527 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1528 file when other TLS flags are tested in a mask.
1529 (TLS_MARK, NON_GOT): Define.
1530 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1531 (update_local_sym_info): Don't create got entry when NON_GOT.
1532 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1533 Set TLS_MARK.
1534 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1535 (ppc64_elf_relocate_section): Likewise.
1536 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1537 __tls_get_addr calls lacking a marker reloc.
1538 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1539 TLS_TPRELGD): Renumber. Update comment.
1540 (TLS_MARK, NON_GOT): Define.
1541 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1542 (update_local_sym_info): Don't create got entry when NON_GOT.
1543 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1544 Set TLS_MARK.
1545 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1546 __tls_get_addr calls lacking a marker reloc.
1547
1548 2018-04-06 H.J. Lu <hongjiu.lu (a] intel.com>
1549
1550 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1551 R_X86_64_converted_reloc_bit.
1552
1553 2018-04-05 H.J. Lu <hongjiu.lu (a] intel.com>
1554
1555 PR gas/22318
1556 * configure: Regenerated.
1557
1558 2018-04-05 Alan Modra <amodra (a] gmail.com>
1559
1560 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1561 (elf_hppa_info_to_howto_rel): Likewise.
1562
1563 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1564
1565 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1566 unsuccessfully for unimplemented relocations.
1567 (elf_hppa_info_to_howto_rel): Likewise.
1568
1569 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1570
1571 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1572 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1573 howto lookup failure.
1574 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1575 accordingly.
1576 (elf32_i860_info_to_howto_rela): Likewise.
1577 (elf32_i860_relocate_splitn): Likewise.
1578 (elf32_i860_relocate_pc16): Likewise.
1579 (elf32_i860_relocate_pc26): Likewise.
1580 (elf32_i860_relocate_section): Likewise.
1581
1582 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1583
1584 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1585 check for `visium_elf_howto_table' table access.
1586
1587 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1588
1589 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1590 check for `iq2000_elf_howto_table' table access.
1591
1592 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1593
1594 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1595 for `elf32_frv_howto_table' table access.
1596
1597 2018-04-04 Maciej W. Rozycki <macro (a] mips.com>
1598
1599 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1600 unsuccessfully for placeholder howtos.
1601 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1602 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1603
1604 2018-03-29 Maciej W. Rozycki <macro (a] mips.com>
1605
1606 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1607 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1608
1609 2018-03-28 Maciej W. Rozycki <macro (a] mips.com>
1610
1611 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1612 ATTRIBUTE_UNUSED from `abfd'.
1613
1614 2018-03-28 Maciej W. Rozycki <macro (a] mips.com>
1615
1616 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1617 `_bfd_error_handler' call formatting.
1618
1619 2018-03-28 Maciej W. Rozycki <macro (a] mips.com>
1620
1621 * elf32-mips.c (mips_info_to_howto_rel): Call
1622 `mips_elf32_rtype_to_howto' directly rather than via
1623 `->elf_backend_mips_rtype_to_howto'.
1624
1625 2018-03-28 Renlin Li <renlin.li (a] arm.com>
1626
1627 PR ld/22970
1628 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1629 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1630 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1631 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1632 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1633 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1634 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1635 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1636 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1637 (elfNN_aarch64_final_link_relocate): Support new relocations.
1638 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1639 relocations.
1640 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1641
1642 2018-03-28 Renlin Li <renlin.li (a] arm.com>
1643
1644 PR ld/22970
1645 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1646 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1647 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1648 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1649 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1650 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1651 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1652 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1653 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1654 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1655 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1656 TLSLE_LDST16_TPREL_LO12,
1657 TLSLE_LDST16_TPREL_LO12_NC,
1658 TLSLE_LDST32_TPREL_LO12,
1659 TLSLE_LDST32_TPREL_LO12_NC,
1660 TLSLE_LDST64_TPREL_LO12,
1661 TLSLE_LDST64_TPREL_LO12_NC,
1662 TLSLE_LDST8_TPREL_LO12,
1663 TLSLE_LDST8_TPREL_LO12_NC.
1664 * bfd-in2.h: Regenerated.
1665 * libbfd.h: Regenerated.
1666
1667 2018-03-28 Eric Botcazou <ebotcazou (a] adacore.com>
1668
1669 PR ld/22972
1670 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1671 has_old_style_got_reloc.
1672 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1673 relocations. Fix a couple of long lines.
1674 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1675 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1676 GOT relocations.
1677
1678 2018-03-25 H.J. Lu <hongjiu.lu (a] intel.com>
1679
1680 PR ld/23000
1681 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1682 ENDBR64 to the TLSDESC PLT entry.
1683
1684 2018-03-21 Alan Modra <amodra (a] gmail.com>
1685
1686 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1687 symbols. Use size_t counts. Delete redundant opd test.
1688
1689 2018-03-21 Alan Modra <amodra (a] gmail.com>
1690
1691 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1692
1693 2018-03-21 Alan Modra <amodra (a] gmail.com>
1694
1695 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1696 field unsigned.
1697 (update_local_sym_info): Likewise for local_got_tls_masks.
1698 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1699
1700 2018-03-21 Alan Modra <amodra (a] gmail.com>
1701
1702 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1703 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1704 do in size_dynamic_sections.
1705
1706 2018-03-21 Alan Modra <amodra (a] gmail.com>
1707
1708 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1709 without first checking array bounds.
1710 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1711
1712 2018-03-20 H.J. Lu <hongjiu.lu (a] intel.com>
1713
1714 PR ld/22983
1715 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1716 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1717
1718 2018-03-19 Nick Clifton <nickc (a] redhat.com>
1719
1720 * po/es.po: Updated Spanish translation.
1721
1722 2018-03-15 Max Filippov <jcmvbkbc (a] gmail.com>
1723
1724 * elf32-xtensa.c (xlate_map_entry): Change types of address
1725 fields from 'unsigned' to 'bfd_vma'.
1726 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1727 the key argument to bsearch. Allow offsets past the end of a
1728 section, use the last map entry for translation of such offsets.
1729
1730 2018-03-15 Kuan-Lin Chen <kuanlinchentw (a] gmail.com>
1731
1732 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1733 Not support the target feature.
1734 (nds32_elf_ex9_itb_base): Likewise.
1735 (nds32_elf_ex9_import_table): Likewise.
1736 (nds32_elf_ex9_finish): Likewise.
1737 (nds32_elf_ex9_reloc_jmp): Likewise.
1738 (nds32_elf_get_insn_with_reg): Likewise.
1739 (nds32_get_local_syms): Likewise.
1740 (nds32_elf_ex9_replace_instruction): Likewise.
1741 (nds32_elf_ifc_calc): Likewise.
1742 (nds32_elf_ifc_finish): Likewise.
1743 (nds32_elf_ifc_replace): Likewise.
1744 (nds32_elf_ifc_reloc): Likewise.
1745
1746 2018-03-14 Alan Modra <amodra (a] gmail.com>
1747
1748 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1749 sfpr size added before defining alias symbols.
1750 (ppc64_elf_build_stubs): Add stub section padding before
1751 copying sfpr contents and defining save/restore alias symbols.
1752
1753 2018-03-14 H.J. Lu <hongjiu.lu (a] intel.com>
1754
1755 PR ld/20882
1756 * elflink.c (elf_gc_mark_debug_section): Also check the local
1757 debug definition section.
1758
1759 2018-03-13 Nick Clifton <nickc (a] redhat.com>
1760
1761 PR 22113
1762 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1763 function. Add an end address parameter. Check access of the data
1764 pointer to make sure that they do not extend beyond the end
1765 address. Return FALSE if any check fails. Add the end address
1766 pointer to the ui structure.
1767 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1768 codes to make sure that they do not extend beyond the end address
1769 pointer. Print an error message and return immediately if any
1770 check fails.
1771
1772 2018-03-09 Nick Clifton <nickc (a] redhat.com>
1773
1774 * elf64-s390.c (elf_s390_relocate_section): Move check for
1775 relocations against non-allocated sections to before the code that
1776 handles ifunc relocations.
1777 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1778 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1779 relocs against IFUNC symbols in non-allocated sections as relocs
1780 against FUNC symbols.
1781 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1782
1783 2018-03-08 H.J. Lu <hongjiu.lu (a] intel.com>
1784
1785 PR ld/22929
1786 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1787 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1788 relocation against FUNC symbol.
1789 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1790
1791 2018-03-07 Renlin Li <renlin.li (a] arm.com>
1792
1793 PR ld/20402
1794 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1795 symbol, and don't emit relocation in specific case.
1796
1797 2018-03-07 Alan Modra <amodra (a] gmail.com>
1798
1799 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1800 (mips_elf64_slurp_one_reloc_table): Pass on error.
1801
1802 2018-03-03 James Cowgill <james.cowgill (a] mips.com>
1803 Maciej W. Rozycki <macro (a] mips.com>
1804
1805 PR ld/21900
1806 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1807 after calling `undefined_symbol' hook if this is an error
1808 condition. Assume the value of 0 for the symbol requested
1809 otherwise.
1810
1811 2018-03-02 Jim Wilson <jimw (a] sifive.com>
1812
1813 PR 22903
1814 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1815 and nop instead of 4.
1816 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1817 8 instead of 4.
1818
1819 2018-03-01 Jim Wilson <jimw (a] sifive.com>
1820
1821 PR 22756
1822 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1823 else if instead of if.
1824
1825 2018-03-01 Alan Modra <amodra (a] gmail.com>
1826
1827 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1828
1829 2018-02-28 Alan Modra <amodra (a] gmail.com>
1830
1831 PR 22887
1832 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1833
1834 2018-02-28 Nick Clifton <nickc (a] redhat.com>
1835
1836 PR 22895
1837 PR 22893
1838 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1839 pointer. Drop unused abfd parameter. Check the size of the block
1840 before initialising the data field. Return the end pointer if the
1841 size is invalid.
1842 (read_attribute_value): Adjust invocations of read_n_bytes.
1843
1844 PR 22894
1845 * dwarf1.c (parse_die): Check the length of form blocks before
1846 advancing the data pointer.
1847
1848 2018-02-28 Alan Modra <amodra (a] gmail.com>
1849
1850 PR 22887
1851 * aoutx.h (translate_symbol_table): Print an error message and set
1852 bfd_error on finding an invalid name string offset.
1853
1854 2018-02-27 H.J. Lu <hongjiu.lu (a] intel.com>
1855
1856 * config.in: Regenerated.
1857 * configure: Likewise.
1858 * configure.ac: Add --enable-separate-code.
1859 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1860 to 1 for Linux/x86 targets,
1861 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1862 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1863
1864 2018-02-27 Nick Clifton <nickc (a] redhat.com>
1865
1866 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1867 message.
1868 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1869 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1870 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1871 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1872 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1873 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1874 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1875 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1876 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1877
1878 PR 22875
1879 * elf-bfd.h (struct elf_backend_data): Change the return type of
1880 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1881 to bfd_boolean.
1882 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1883 value from the info_to_howto function and fail if that function
1884 failed.
1885 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1886 from the info_to_howto function.
1887 (elf32_h8_relax_section): Likewise.
1888 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1889 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1890 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1891 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1892 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1893 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1894 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1895 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1896 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1897 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1898 (riscv_elf_relocate_section): Likewise.
1899 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1900 bfd_boolean. Issue an error message, set an error value and
1901 return FALSE if the reloc is not recognized.
1902 (elf_hppa_info_to_howto_rel): Likewise.
1903 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1904 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1905 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1906 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1907 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1908 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1909 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1910 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1911 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1912 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1913 (cris_info_to_howto_rela): Likewise.
1914 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1915 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1916 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1917 Likewise.
1918 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1919 (elf32_dlx_info_to_howto_rel): Likewise.
1920 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1921 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1922 * elf32-frv.c (frv_info_to_howto_rela)
1923 (frvfdpic_info_to_howto_rel): Likewise.
1924 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1925 * elf32-gen.c (elf_generic_info_to_howto)
1926 (elf_generic_info_to_howto_rel): Likewise.
1927 * elf32-h8300.c (elf32_h8_info_to_howto)
1928 (elf32_h8_info_to_howto_rel): Likewise.
1929 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1930 * elf32-i386.c (elf_i386_reloc_type_lookup)
1931 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1932 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1933 Likewise.
1934 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1935 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1936 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1937 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1938 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1939 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1940 Likewise.
1941 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1942 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1943 * elf32-m68k.c (rtype_to_howto): Likewise.
1944 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1945 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1946 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1947 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1948 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1949 Likewise.
1950 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1951 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1952 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1953 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1954 Likewise.
1955 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1956 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1957 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1958 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1959 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1960 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1961 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1962 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1963 * elf32-score.c (s3_bfd_score_info_to_howto)
1964 (_bfd_score_info_to_howto): Likewise.
1965 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1966 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1967 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1968 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1969 (elf32_tic6x_info_to_howto_rel): Likewise.
1970 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1971 * elf32-v850.c (v850_elf_info_to_howto_rel)
1972 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1973 * elf32-vax.c (rtype_to_howto): Likewise.
1974 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1975 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1976 (elf32_wasm32_info_to_howto_rela): Likewise.
1977 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1978 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1979 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1980 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1981 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1982 * elf64-gen.c (elf_generic_info_to_howto)
1983 (elf_generic_info_to_howto_rel): Likewise.
1984 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1985 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1986 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1987 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1988 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1989 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1990 Likewise.
1991 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1992 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1993 Likewise.
1994 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1995 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1996 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1997 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1998 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1999 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2000 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2001 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2002 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2003 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2004 Default to NULL.
2005
2006 2018-02-26 Jim Wilson <jimw (a] sifive.com>
2007 Stephan Schreiber <info (a] fs-driver.org>
2008
2009 PR 15904
2010 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2011 call, set changed_contents and changed_relocs. Likewise after
2012 successful ia64_elf_relax_br call.
2013
2014 2018-02-26 Alan Modra <amodra (a] gmail.com>
2015
2016 * elf.c (assign_file_positions_except_relocs): Don't segfault
2017 when actual number of phdrs is less than allocated. Delete
2018 outdated comment. Formatting.
2019
2020 2018-02-26 Alan Modra <amodra (a] gmail.com>
2021
2022 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2023 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2024 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2025 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2026 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2027 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2028 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2029 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2030 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2031 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2032 error/warning messages.
2033
2034 2018-02-26 Alan Modra <amodra (a] gmail.com>
2035
2036 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2037 * syms.c: Standardize error/warning messages.
2038
2039 2018-02-26 Alan Modra <amodra (a] gmail.com>
2040
2041 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2042 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2043 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2044 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2045
2046 2018-02-26 Alan Modra <amodra (a] gmail.com>
2047
2048 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2049
2050 2018-02-26 Alan Modra <amodra (a] gmail.com>
2051
2052 * elfxx-mips.c: Standardize error/warning messages.
2053
2054 2018-02-26 Alan Modra <amodra (a] gmail.com>
2055
2056 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2057 * elflink.c: Standardize error/warning messages. Replace use of
2058 linker callback einfo with _bfd_error_handler when possible.
2059
2060 2018-02-26 Alan Modra <amodra (a] gmail.com>
2061
2062 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2063 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2064 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2065 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2066 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2067 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2068 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2069 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2070 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2071 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2072 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2073 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2074 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2075 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2076 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2077 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2078 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2079 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2080 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2081 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2082 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2083 unrecognized/unsupported reloc message.
2084
2085 2018-02-26 Alan Modra <amodra (a] gmail.com>
2086
2087 * elf32-ppc.c: Standardize error/warning messages. Use
2088 _bfd_error_handler rather than einfo when einfo features not used.
2089 * elf64-ppc.c: Likewise.
2090
2091 2018-02-23 Alan Modra <amodra (a] gmail.com>
2092
2093 PR 22881
2094 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2095 segment if no matching LOAD segment.
2096
2097 2018-02-23 Kuan-Lin Chen <kuanlinchentw (a] gmail.com>
2098
2099 * elf32-nds32.h: Define mask for ict_model.
2100
2101 2018-02-20 Jason Duerstock <jason.duerstock (a] gmail.com>
2102
2103 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2104
2105 2018-02-19 Maciej W. Rozycki <macro (a] mips.com>
2106
2107 Revert
2108 2018-01-12 Vlad Ivanov <vlad (a] ivanov.email>
2109
2110 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2111 .reginfo section has wrong size.
2112
2113 2018-02-19 Maciej W. Rozycki <macro (a] mips.com>
2114
2115 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2116 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2117 `.MIPS.abiflags' sections.
2118 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2119 section's end.
2120
2121 2018-02-19 Maciej W. Rozycki <macro (a] mips.com>
2122
2123 * section.c (SEC_FIXED_SIZE): New macro.
2124 * bfd-in2.h: Regenerate.
2125
2126 2018-02-19 Maciej W. Rozycki <macro (a] mips.com>
2127
2128 * section.c (SEC_HAS_GOT_REF): Remove macro.
2129 * bfd-in2.h: Regenerate.
2130
2131 2018-02-19 Alan Modra <amodra (a] gmail.com>
2132
2133 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2134 arguments.
2135 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2136 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2137 (_bfd_riscv_relax_pc): Likewise and fix typos.
2138 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2139 * libbfd.h: Regenerate.
2140
2141 2018-02-19 Alan Modra <amodra (a] gmail.com>
2142
2143 * dwarf2.c (read_section): Don't use 'll' format modifier.
2144 (find_abstract_instance): Likewise.
2145 * elfcore.h (elf_core_file_p): Likewise.
2146
2147 2018-02-19 Alan Modra <amodra (a] gmail.com>
2148
2149 * bfd-in.h: Include inttypes.h or if not available define
2150 PRId64, PRIu64 and PRIx64.
2151 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2152 modifier to print bfd_vma.
2153 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2154 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2155 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2156 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2157 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2158 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2159 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2160 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2161 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2162 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2163 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2164 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2165 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2166 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2167 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2168 and cast input to uint64_t, and similarly for Ld and Lu.
2169 * bfd-in2.h: Regenerate.
2170
2171 2018-02-19 Alan Modra <amodra (a] gmail.com>
2172
2173 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2174 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2175 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2176 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2177 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2178 * reloc.c: Replace use of %R and %T in format strings passed to
2179 einfo and friends by %pR and %pT.
2180
2181 2018-02-19 Alan Modra <amodra (a] gmail.com>
2182
2183 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2184 of %A and %B.
2185 * aout-adobe.c: Update all messages using %A and %B.
2186 * aout-cris.c: Likewise.
2187 * aoutx.h: Likewise.
2188 * archive.c: Likewise.
2189 * binary.c: Likewise.
2190 * cache.c: Likewise.
2191 * coff-alpha.c: Likewise.
2192 * coff-arm.c: Likewise.
2193 * coff-i860.c: Likewise.
2194 * coff-mcore.c: Likewise.
2195 * coff-ppc.c: Likewise.
2196 * coff-rs6000.c: Likewise.
2197 * coff-sh.c: Likewise.
2198 * coff-tic4x.c: Likewise.
2199 * coff-tic54x.c: Likewise.
2200 * coff-tic80.c: Likewise.
2201 * coff64-rs6000.c: Likewise.
2202 * coffcode.h: Likewise.
2203 * coffgen.c: Likewise.
2204 * cofflink.c: Likewise.
2205 * coffswap.h: Likewise.
2206 * compress.c: Likewise.
2207 * cpu-arm.c: Likewise.
2208 * ecoff.c: Likewise.
2209 * elf-attrs.c: Likewise.
2210 * elf-eh-frame.c: Likewise.
2211 * elf-ifunc.c: Likewise.
2212 * elf-m10300.c: Likewise.
2213 * elf-properties.c: Likewise.
2214 * elf-s390-common.c: Likewise.
2215 * elf.c: Likewise.
2216 * elf32-arc.c: Likewise.
2217 * elf32-arm.c: Likewise.
2218 * elf32-avr.c: Likewise.
2219 * elf32-bfin.c: Likewise.
2220 * elf32-cr16.c: Likewise.
2221 * elf32-cr16c.c: Likewise.
2222 * elf32-cris.c: Likewise.
2223 * elf32-crx.c: Likewise.
2224 * elf32-d10v.c: Likewise.
2225 * elf32-d30v.c: Likewise.
2226 * elf32-epiphany.c: Likewise.
2227 * elf32-fr30.c: Likewise.
2228 * elf32-frv.c: Likewise.
2229 * elf32-gen.c: Likewise.
2230 * elf32-hppa.c: Likewise.
2231 * elf32-i370.c: Likewise.
2232 * elf32-i386.c: Likewise.
2233 * elf32-i960.c: Likewise.
2234 * elf32-ip2k.c: Likewise.
2235 * elf32-iq2000.c: Likewise.
2236 * elf32-lm32.c: Likewise.
2237 * elf32-m32c.c: Likewise.
2238 * elf32-m32r.c: Likewise.
2239 * elf32-m68hc11.c: Likewise.
2240 * elf32-m68hc12.c: Likewise.
2241 * elf32-m68hc1x.c: Likewise.
2242 * elf32-m68k.c: Likewise.
2243 * elf32-mcore.c: Likewise.
2244 * elf32-mep.c: Likewise.
2245 * elf32-metag.c: Likewise.
2246 * elf32-microblaze.c: Likewise.
2247 * elf32-moxie.c: Likewise.
2248 * elf32-msp430.c: Likewise.
2249 * elf32-mt.c: Likewise.
2250 * elf32-nds32.c: Likewise.
2251 * elf32-nios2.c: Likewise.
2252 * elf32-or1k.c: Likewise.
2253 * elf32-pj.c: Likewise.
2254 * elf32-ppc.c: Likewise.
2255 * elf32-rl78.c: Likewise.
2256 * elf32-rx.c: Likewise.
2257 * elf32-s390.c: Likewise.
2258 * elf32-score.c: Likewise.
2259 * elf32-score7.c: Likewise.
2260 * elf32-sh-symbian.c: Likewise.
2261 * elf32-sh.c: Likewise.
2262 * elf32-sh64.c: Likewise.
2263 * elf32-sparc.c: Likewise.
2264 * elf32-spu.c: Likewise.
2265 * elf32-tic6x.c: Likewise.
2266 * elf32-tilepro.c: Likewise.
2267 * elf32-v850.c: Likewise.
2268 * elf32-vax.c: Likewise.
2269 * elf32-visium.c: Likewise.
2270 * elf32-wasm32.c: Likewise.
2271 * elf32-xgate.c: Likewise.
2272 * elf32-xtensa.c: Likewise.
2273 * elf64-alpha.c: Likewise.
2274 * elf64-gen.c: Likewise.
2275 * elf64-hppa.c: Likewise.
2276 * elf64-ia64-vms.c: Likewise.
2277 * elf64-mmix.c: Likewise.
2278 * elf64-ppc.c: Likewise.
2279 * elf64-s390.c: Likewise.
2280 * elf64-sh64.c: Likewise.
2281 * elf64-sparc.c: Likewise.
2282 * elf64-x86-64.c: Likewise.
2283 * elfcode.h: Likewise.
2284 * elfcore.h: Likewise.
2285 * elflink.c: Likewise.
2286 * elfnn-aarch64.c: Likewise.
2287 * elfnn-ia64.c: Likewise.
2288 * elfnn-riscv.c: Likewise.
2289 * elfxx-mips.c: Likewise.
2290 * elfxx-sparc.c: Likewise.
2291 * elfxx-tilegx.c: Likewise.
2292 * elfxx-x86.c: Likewise.
2293 * hpux-core.c: Likewise.
2294 * ieee.c: Likewise.
2295 * ihex.c: Likewise.
2296 * libbfd.c: Likewise.
2297 * linker.c: Likewise.
2298 * mach-o.c: Likewise.
2299 * merge.c: Likewise.
2300 * mmo.c: Likewise.
2301 * oasys.c: Likewise.
2302 * pdp11.c: Likewise.
2303 * pe-mips.c: Likewise.
2304 * peXXigen.c: Likewise.
2305 * peicode.h: Likewise.
2306 * reloc.c: Likewise.
2307 * rs6000-core.c: Likewise.
2308 * srec.c: Likewise.
2309 * stabs.c: Likewise.
2310 * vms-alpha.c: Likewise.
2311 * xcofflink.c: Likewise.
2312
2313 2018-02-19 Alan Modra <amodra (a] gmail.com>
2314
2315 PR 22845
2316 * elf.c (IS_TBSS): Define.
2317 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2318 (assign_file_positions_for_non_load_sections): Revert last change.
2319 Properly calculate load segment limits to compare against relro limits.
2320
2321 2018-02-17 Alan Modra <amodra (a] gmail.com>
2322
2323 PR 22845
2324 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2325 degenerate zero size PT_LOAD segments when finding one overlapping
2326 the PT_GNU_RELRO segment.
2327
2328 2018-02-16 Alan Modra <amodra (a] gmail.com>
2329
2330 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2331 (_bfd_bool_bfd_true): Rename from bfd_true.
2332 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2333 (_bfd_int_bfd_0): Rename from bfd_0.
2334 (_bfd_uint_bfd_0): Rename from bfd_0u.
2335 (_bfd_long_bfd_0): Rename from bfd_0l.
2336 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2337 (_bfd_void_bfd): Rename from bfd_void.
2338 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2339 (_bfd_bool_bfd_link_false_error),
2340 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2341 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2342 (_bfd_bool_bfd_asection_bfd_asection_true),
2343 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2344 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2345 * archive.c (_bfd_noarchive_get_elt_at_index),
2346 (_bfd_noarchive_openr_next_archived_file),
2347 (_bfd_noarchive_construct_extended_name_table),
2348 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2349 (_bfd_noarchive_write_armap): New functions.
2350 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2351 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2352 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2353 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2354 (alpha_ecoff_swap_coff_lineno_out),
2355 (alpha_ecoff_swap_coff_reloc_out): New functions.
2356 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2357 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2358 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2359 (mips_ecoff_swap_coff_lineno_out),
2360 (mips_ecoff_swap_coff_reloc_out): New functions.
2361 * coffcode.h (coff_set_alignment_hook): Replace define with
2362 new function.
2363 (symname_in_debug_hook): Likewise.
2364 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2365 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2366 * elf.c (assign_file_positions_except_relocs): Test
2367 elf_backend_allow_non_load_phdr for NULL.
2368 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2369 _bfd_elf_link_omit_section_dynsym. Update uses.
2370 (_bfd_elf_omit_section_dynsym_all): New function.
2371 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2372 (_bfd_elf_omit_section_dynsym_default): Declare.
2373 (_bfd_elf_omit_section_dynsym_all): Declare.
2374 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2375 (_bfd_nolink_bfd_get_relocated_section_contents),
2376 (_bfd_nolink_bfd_lookup_section_flags),
2377 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2378 (_bfd_nolink_bfd_link_hash_table_create),
2379 (_bfd_nolink_bfd_link_just_syms),
2380 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2381 (_bfd_nolink_bfd_link_split_section),
2382 (_bfd_nolink_section_already_linked),
2383 (_bfd_nolink_bfd_define_common_symbol),
2384 (_bfd_nolink_bfd_define_start_stop): New functions.
2385 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2386 (_bfd_norelocs_bfd_reloc_name_lookup),
2387 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2388 * section.c (_bfd_nowrite_set_section_contents): New function.
2389 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2390 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2391 (_bfd_nosymbols_get_symbol_version_string),
2392 (_bfd_nosymbols_bfd_is_local_label_name),
2393 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2394 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2395 (_bfd_nosymbols_bfd_make_debug_symbol),
2396 ( _bfd_nosymbols_read_minisymbols),
2397 ( _bfd_nosymbols_minisymbol_to_symbol),
2398 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2399 * libbfd-in.h: Declare new functions. Update existing defines,
2400 removing casts.
2401 * aix386-core.c: Update to use new hooks. Formatting.
2402 * aout-adobe.c: Likewise.
2403 * aout-arm.c: Likewise.
2404 * aout-target.h: Likewise.
2405 * aout-tic30.c: Likewise.
2406 * aoutf1.h: Likewise.
2407 * binary.c: Likewise.
2408 * bout.c: Likewise.
2409 * cisco-core.c: Likewise.
2410 * coff-alpha.c: Likewise.
2411 * coff-i386.c: Likewise.
2412 * coff-i860.c: Likewise.
2413 * coff-i960.c: Likewise.
2414 * coff-ia64.c: Likewise.
2415 * coff-mips.c: Likewise.
2416 * coff-ppc.c: Likewise.
2417 * coff-rs6000.c: Likewise.
2418 * coff-sh.c: Likewise.
2419 * coff-tic30.c: Likewise.
2420 * coff-tic54x.c: Likewise.
2421 * coff-x86_64.c: Likewise.
2422 * coff64-rs6000.c: Likewise.
2423 * coffcode.h: Likewise.
2424 * elf-m10300.c: Likewise.
2425 * elf32-cr16.c: Likewise.
2426 * elf32-lm32.c: Likewise.
2427 * elf32-m32r.c: Likewise.
2428 * elf32-metag.c: Likewise.
2429 * elf32-score.c: Likewise.
2430 * elf32-score7.c: Likewise.
2431 * elf32-tilepro.c: Likewise.
2432 * elf32-xstormy16.c: Likewise.
2433 * elf32-xtensa.c: Likewise.
2434 * elf64-alpha.c: Likewise.
2435 * elf64-hppa.c: Likewise.
2436 * elf64-ia64-vms.c: Likewise.
2437 * elf64-mmix.c: Likewise.
2438 * elf64-sh64.c: Likewise.
2439 * elfnn-ia64.c: Likewise.
2440 * elfxx-sparc.c: Likewise.
2441 * elfxx-target.h: Likewise.
2442 * elfxx-tilegx.c: Likewise.
2443 * elfxx-x86.h: Likewise.
2444 * hp300hpux.c: Likewise.
2445 * hppabsd-core.c: Likewise.
2446 * hpux-core.c: Likewise.
2447 * i386msdos.c: Likewise.
2448 * i386os9k.c: Likewise.
2449 * ieee.c: Likewise.
2450 * ihex.c: Likewise.
2451 * irix-core.c: Likewise.
2452 * libaout.h: Likewise.
2453 * libecoff.h: Likewise.
2454 * mach-o-target.c: Likewise.
2455 * mach-o.c: Likewise.
2456 * mipsbsd.c: Likewise.
2457 * mmo.c: Likewise.
2458 * netbsd-core.c: Likewise.
2459 * nlm-target.h: Likewise.
2460 * oasys.c: Likewise.
2461 * osf-core.c: Likewise.
2462 * pdp11.c: Likewise.
2463 * pe-mips.c: Likewise.
2464 * pe-x86_64.c: Likewise.
2465 * pef.c: Likewise.
2466 * plugin.c: Likewise.
2467 * ppcboot.c: Likewise.
2468 * ptrace-core.c: Likewise.
2469 * sco5-core.c: Likewise.
2470 * som.c: Likewise.
2471 * sparclynx.c: Likewise.
2472 * srec.c: Likewise.
2473 * tekhex.c: Likewise.
2474 * trad-core.c: Likewise.
2475 * verilog.c: Likewise.
2476 * versados.c: Likewise.
2477 * vms-alpha.c: Likewise.
2478 * vms-lib.c: Likewise.
2479 * wasm-module.c: Likewise.
2480 * xsym.c: Likewise.
2481 * libbfd.h: Regenerate.
2482
2483 2018-02-15 Jim Wilson <jimw (a] sifive.com>
2484
2485 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2486 symbols whose section address is zero.
2487
2488 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2489 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2490 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2491 Add %X%P to error messages.
2492
2493 2018-02-15 Eric Botcazou <ebotcazou (a] adacore.com>
2494
2495 PR ld/22832
2496 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2497 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2498 and assert that the result of the call is not NULL.
2499
2500 2018-02-14 Nick Clifton <nickc (a] redhat.com>
2501
2502 PR 22823
2503 Revert previous delta. Add extra casts to avoid compile time
2504 warnings instead.
2505 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2506 cast to avoid warning from gcc v8 compiler.
2507 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2508 (_bfd_generic_bfd_set_private_flags): Likewise.
2509 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2510 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2511 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2512 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2513 (_bfd_noarchive_construct_extended_name_table): Likewise.
2514 (_bfd_noarchive_truncate_arname): Likewise.
2515 (_bfd_noarchive_write_ar_hdr): Likewise.
2516 (_bfd_noarchive_get_elt_at_index): Likewise.
2517 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2518 (_bfd_nosymbols_print_symbol): Likewise.
2519 (_bfd_nosymbols_get_symbol_info): Likewise.
2520 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2521 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2522 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2523 (_bfd_nosymbols_get_lineno): Likewise.
2524 (_bfd_nosymbols_find_nearest_line): Likewise.
2525 (_bfd_nosymbols_find_line): Likewise.
2526 (_bfd_nosymbols_find_inliner_info): Likewise.
2527 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2528 (_bfd_nosymbols_read_minisymbols): Likewise.
2529 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2530 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2531 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2532 (_bfd_nowrite_set_arch_mach): Likewise.
2533 (_bfd_nowrite_set_section_contents): Likewise.
2534 (_bfd_nolink_sizeof_headers): Likewise.
2535 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2536 (_bfd_nolink_bfd_relax_section): Likewise.
2537 (_bfd_nolink_bfd_gc_sections): Likewise.
2538 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2539 (_bfd_nolink_bfd_merge_sections): Likewise.
2540 (_bfd_nolink_bfd_is_group_section): Likewise.
2541 (_bfd_nolink_bfd_discard_group): Likewise.
2542 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2543 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2544 (_bfd_nolink_bfd_link_just_syms): Likewise.
2545 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2546 (_bfd_nolink_bfd_final_link): Likewise.
2547 (_bfd_nolink_bfd_link_split_section): Likewise.
2548 (_bfd_nolink_section_already_linked): Likewise.
2549 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2550 (_bfd_nolink_bfd_define_start_stop): Likewise.
2551 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2552 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2553 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2554 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2555 * libbfd.c (bfd_false_any): Delete.
2556 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2557 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2558 * libbfd.h (extern): Regenerate
2559 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2560 cast to avoid warning from gcc v8 compiler.
2561 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2562 * binary.c (binary_get_symbol_info): Likewise.
2563 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2564 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2565 * coffcode.h (coff_set_alignment_hook): Likewise.
2566 (symname_in_debug_hook): Likewise.
2567 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2568 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2569 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2570 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2571 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2572 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2573 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2574 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2575 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2576 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2577 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2578 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2579 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2580 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2581 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2582 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2583 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2584 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2585 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2586 (bfd_elfNN_bfd_set_private_flags): Likewise.
2587 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2588 (elf_backend_init_index_section): Likewise.
2589 (elf_backend_allow_non_load_phdr): Likewise.
2590 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2591 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2592 * ieee.c (ieee_construct_extended_name_table): Likewise.
2593 (ieee_write_armap): Likewise.
2594 (ieee_write_ar_hdr): Likewise.
2595 (ieee_bfd_is_target_special_symbol): Likewise.
2596 * ihex.c (ihex_canonicalize_symtab): Likewise.
2597 (ihex_bfd_is_target_special_symbol): Likewise.
2598 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2599 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2600 (_bfd_ecoff_set_alignment_hook): Likewise.
2601 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2602 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2603 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2604 * oasys.c (oasys_construct_extended_name_table): Likewise.
2605 (oasys_write_armap): Likewise.
2606 (oasys_write_ar_hdr): Likewise.
2607 (oasys_bfd_is_target_special_symbol): Likewise.
2608 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2609 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2610 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2611 * som.c (som_bfd_is_target_special_symbol): Likewise.
2612 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2613 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2614 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2615 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2616 (versados_bfd_reloc_name_lookup): Likewise.
2617 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2618 (vms_bfd_define_start_stop): Likewise.
2619 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2620 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2621 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2622
2623 2018-02-14 H.J. Lu <hongjiu.lu (a] intel.com>
2624
2625 PR ld/22842
2626 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2627 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2628 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2629 R_X86_64_PC32 reloc against dynamic function in data section.
2630 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2631 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2632 against dynamic function in data section.
2633 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2634 function address only if pcrel_plt is true.
2635 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2636 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2637 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2638 PC-relative relocation against a function definition in data
2639 secton in PIE. Remove the obsolete comments.
2640 (elf_x86_link_hash_table): Add pcrel_plt.
2641
2642 2018-02-13 H.J. Lu <hongjiu.lu (a] intel.com>
2643
2644 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2645 instead of bfd_link_pic, for building shared library.
2646
2647 2018-02-13 H.J. Lu <hongjiu.lu (a] intel.com>
2648
2649 PR gas/22791
2650 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2651 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2652 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2653 against protected function in shared object.
2654
2655 2018-02-13 Sergei Trofimovich <slyfox (a] inbox.ru>
2656
2657 PR 22828
2658 * po/ru.po: Fix typo in Russian translation.
2659
2660 2018-02-13 Maciej W. Rozycki <macro (a] mips.com>
2661
2662 * wasm-module.c (wasm_scan_name_function_section): Rename
2663 `index' local variable to `idx'.
2664
2665 2018-02-13 Nick Clifton <nickc (a] redhat.com>
2666
2667 PR 22823
2668 Fix compile time warnings generated by gcc version 8.
2669 * libbfd-in.h: Remove extraneous text from prototypes.
2670 Add prototypes for bfd_false_any, bfd_true_any,
2671 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2672 bfd_n1_any, bfd_void_any.
2673 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2674 function.
2675 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2676 (_bfd_generic_bfd_set_private_flags): Likewise.
2677 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2678 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2679 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2680 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2681 (_bfd_noarchive_construct_extended_name_table): Likewise.
2682 (_bfd_noarchive_truncate_arname): Likewise.
2683 (_bfd_noarchive_write_ar_hdr): Likewise.
2684 (_bfd_noarchive_get_elt_at_index): Likewise.
2685 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2686 (_bfd_nosymbols_print_symbol): Likewise.
2687 (_bfd_nosymbols_get_symbol_info): Likewise.
2688 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2689 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2690 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2691 (_bfd_nosymbols_get_lineno): Likewise.
2692 (_bfd_nosymbols_find_nearest_line): Likewise.
2693 (_bfd_nosymbols_find_line): Likewise.
2694 (_bfd_nosymbols_find_inliner_info): Likewise.
2695 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2696 (_bfd_nosymbols_read_minisymbols): Likewise.
2697 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2698 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2699 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2700 (_bfd_nowrite_set_arch_mach): Likewise.
2701 (_bfd_nowrite_set_section_contents): Likewise.
2702 (_bfd_nolink_sizeof_headers): Likewise.
2703 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2704 (_bfd_nolink_bfd_relax_section): Likewise.
2705 (_bfd_nolink_bfd_gc_sections): Likewise.
2706 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2707 (_bfd_nolink_bfd_merge_sections): Likewise.
2708 (_bfd_nolink_bfd_is_group_section): Likewise.
2709 (_bfd_nolink_bfd_discard_group): Likewise.
2710 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2711 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2712 (_bfd_nolink_bfd_link_just_syms): Likewise.
2713 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2714 (_bfd_nolink_bfd_final_link): Likewise.
2715 (_bfd_nolink_bfd_link_split_section): Likewise.
2716 (_bfd_nolink_section_already_linked): Likewise.
2717 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2718 (_bfd_nolink_bfd_define_start_stop): Likewise.
2719 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2720 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2721 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2722 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2723 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2724 accepts one or more arguments.
2725 (bfd_true_any): Likewise.
2726 (bfd_nullvoidptr_any): Likewise.
2727 (bfd_0_any): Likewise.
2728 (bfd_0u_any): Likewise.
2729 (bfd_0l_any): Likewise.
2730 (_bfd_n1_any): Likewise.
2731 (bfd_void_any): Likewise.
2732 * libbfd.h (extern): Regenerate
2733 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2734 based dummy function.
2735 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2736 * binary.c (binary_get_symbol_info): Likewise.
2737 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2738 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2739 * coffcode.h (coff_set_alignment_hook): Likewise.
2740 (symname_in_debug_hook): Likewise.
2741 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2742 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2743 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2744 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2745 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2746 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2747 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2748 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2749 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2750 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2751 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2752 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2753 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2754 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2755 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2756 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2757 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2758 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2759 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2760 (bfd_elfNN_bfd_set_private_flags): Likewise.
2761 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2762 (elf_backend_init_index_section): Likewise.
2763 (elf_backend_allow_non_load_phdr): Likewise.
2764 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2765 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2766 * ieee.c (ieee_construct_extended_name_table): Likewise.
2767 (ieee_write_armap): Likewise.
2768 (ieee_write_ar_hdr): Likewise.
2769 (ieee_bfd_is_target_special_symbol): Likewise.
2770 * ihex.c (ihex_canonicalize_symtab): Likewise.
2771 (ihex_bfd_is_target_special_symbol): Likewise.
2772 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2773 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2774 (_bfd_ecoff_set_alignment_hook): Likewise.
2775 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2776 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2777 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2778 * oasys.c (oasys_construct_extended_name_table): Likewise.
2779 (oasys_write_armap): Likewise.
2780 (oasys_write_ar_hdr): Likewise.
2781 (oasys_bfd_is_target_special_symbol): Likewise.
2782 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2783 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2784 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2785 * som.c (som_bfd_is_target_special_symbol): Likewise.
2786 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2787 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2788 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2789 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2790 (versados_bfd_reloc_name_lookup): Likewise.
2791 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2792 (vms_bfd_define_start_stop): Likewise.
2793 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2794 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2795 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2796 * elf32-arc.c (get_replace_function): Assign replacement function
2797 to func pointer.
2798 * elf32-i370.c (i370_noop): Update prototype.
2799
2800 2018-02-13 Alan Modra <amodra (a] gmail.com>
2801
2802 PR 22836
2803 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2804 relocation sections. If size reduces to just the flag word,
2805 remove that too and mark with SEC_EXCLUDE.
2806 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2807
2808 2018-02-13 Alan Modra <amodra (a] gmail.com>
2809
2810 PR 22829
2811 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2812 PT_GNU_RELRO setup.
2813
2814 2018-02-12 Zebediah Figura <z.figura12 (a] gmail.com>
2815
2816 * i386msdos.c (msdos_mkobject); New function.
2817 (msdos_object_p): New function.
2818 (i386_msdos_vec): Use msdos_object_p as the check_format
2819 function.
2820 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2821 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2822 IMAGE_NT_SIGNATURE.
2823 * peXXigen.c: Likewise.
2824 * coff-ia64.c: Likewise.
2825
2826 2018-02-12 Nick Clifton <nickc (a] redhat.com>
2827
2828 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2829 assignment.
2830 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2831
2832 2018-02-09 Eric Botcazou <ebotcazou (a] adacore.com>
2833
2834 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2835 (sparc_elf_append_rela): Assert that there is enough room in section.
2836 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2837 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2838 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2839 For a symbol subject to a GOT relocation, reserve a slot in the
2840 relocation section if the symbol isn't dynamic and we are in PIC mode.
2841 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2842 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2843 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2844 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2845 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2846 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2847 undefined weak symbol with non-default visibility. Remove superfluous
2848 'else' and fix formatting.
2849
2850 2018-02-09 H.J. Lu <hongjiu.lu (a] intel.com>
2851
2852 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2853 is_solaris.
2854 (i386_elf32_sol2_vec): Don't declare.
2855 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2856 Don't set need_global_offset_table.
2857 (elf_i386_solaris_arch_bed): New.
2858 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2859 Solaris.
2860 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2861 target_os != is_nacl instead of target_os == is_normal.
2862 (x86_64_elf64_sol2_vec): Don't declare.
2863 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2864 is_nacl instead of target_os == is_normal. Don't set
2865 need_global_offset_table.
2866 (elf_x86_64_solaris_arch_bed): New.
2867 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2868 Solaris.
2869 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2870 _GLOBAL_OFFSET_TABLE_ for Solaris.
2871 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2872 need_global_offset_table.
2873 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2874 (elf_x86_link_hash_table): Remove need_global_offset_table.
2875 (elf_x86_init_table): Likewise.
2876
2877 2018-02-08 H.J. Lu <hongjiu.lu (a] intel.com>
2878
2879 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2880 Remove prototype.
2881 (i386_elf32_sol2_vec): Declared.
2882 (elf_i386_link_setup_gnu_properties): Set
2883 need_global_offset_table with info->output_bfd->xvec.
2884 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2885 Remove prototype.
2886 (x86_64_elf64_sol2_vec): Declared.
2887 (elf_x86_64_link_setup_gnu_properties): Set
2888 need_global_offset_table with info->output_bfd->xvec.
2889
2890 2018-02-08 H.J. Lu <hongjiu.lu (a] intel.com>
2891
2892 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2893 New prototype.
2894 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2895 for Solaris.
2896 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2897 New prototype.
2898 (elf_x86_64_link_setup_gnu_properties): Set
2899 need_global_offset_table for Solaris.
2900 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2901 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2902 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2903 need_global_offset_table.
2904 * elfxx-x86.h (elf_x86_link_hash_table): Add
2905 need_global_offset_table.
2906 (elf_x86_init_table): Likewise.
2907
2908 2018-02-08 Jim Wilson <jimw (a] sifive.com>
2909
2910 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2911 change.
2912
2913 2018-02-08 Nick Clifton <nickc (a] redhat.com>
2914
2915 PR 22788
2916 * elf.c (elf_parse_notes): Reject notes with excessuively large
2917 alignments.
2918
2919 2018-02-07 Alan Modra <amodra (a] gmail.com>
2920
2921 Revert 2018-01-17 Alan Modra <amodra (a] gmail.com>
2922 * elf32-ppc.c: Remove speculation barrier support.
2923 * elf32-ppc.h: Likewise.
2924 * elf64-ppc.c: Likewise.
2925 * elf64-ppc.h: Likewise.
2926
2927 2018-02-06 Jim Wilson <jimw (a] sifive.com>
2928
2929 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2930 callback to report an error.
2931
2932 2018-02-06 Eric Botcazou <ebotcazou (a] adacore.com>
2933
2934 PR ld/22263
2935 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2936 into call to !bfd_link_executable and tidy up.
2937 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2938 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2939 !bfd_link_executable.
2940 <R_SPARC_TLS_IE_HI22>: Likewise.
2941 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2942 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2943 !bfd_link_executable.
2944 <R_SPARC_WPLT30>: Tidy up.
2945 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2946 !bfd_link_executable.
2947 (allocate_dynrelocs): Likewise.
2948 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2949 <R_SPARC_TLS_GD_HI22>: Merge into...
2950 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2951 sparc_elf_tls_transition and remove redundant code.
2952 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2953 !bfd_link_executable.
2954 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2955 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2956 <R_SPARC_TLS_LDM_CALL>: Likewise.
2957 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2958 <R_SPARC_TLS_GD_ADD>: Likewise.
2959 <R_SPARC_TLS_LDM_ADD>: Likewise.
2960 <R_SPARC_TLS_LDO_ADD>: Likewise.
2961 <R_SPARC_TLS_IE_LD>: Likewise.
2962
2963 2018-02-06 Milo Stojanovi <milos.stojanovic (a] rt-rk.com>
2964
2965 PR 22789
2966 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2967 functions failed to find the function name, try the generic elf
2968 find function instead.
2969
2970 2018-02-06 Sergio Durigan Junior <sergiodj (a] redhat.com>
2971
2972 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2973 'memcpy' instead of 'strncpy' when writing the magic number.
2974
2975 2018-02-06 Nick Clifton <nickc (a] redhat.com>
2976
2977 PR 22794
2978 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2979 section before attempting to read it in.
2980 (bfd_get_alt_debug_link_info): Likewise.
2981
2982 2018-02-06 Paul Carroll <pcarroll (a] codesourcery.com>
2983
2984 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2985 line information in addition to name, if they can be found.
2986
2987 2018-02-05 Renlin Li <renlin.li (a] arm.com>
2988
2989 PR ld/22764
2990 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2991 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2992 check for writeable section as well.
2993
2994 2018-02-05 H.J. Lu <hongjiu.lu (a] intel.com>
2995
2996 PR ld/22782
2997 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2998 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2999 undefined weak symbol to 0.
3000 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3001 if _GLOBAL_OFFSET_TABLE_ is referenced.
3002 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3003 got_referenced instead of ref_regular_nonweak. Remove the
3004 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3005 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3006
3007 2018-02-05 Maciej W. Rozycki <macro (a] mips.com>
3008
3009 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3010 initialize `hi_reloc'.
3011
3012 2018-02-05 Maciej W. Rozycki <macro (a] mips.com>
3013
3014 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3015 SHT_MIPS_REGINFO sections don't assert the correct size and
3016 report an error instead.
3017
3018 2018-02-05 Maciej W. Rozycki <macro (a] mips.com>
3019
3020 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3021 status from `->elf_backend_section_processing'.
3022
3023 2018-02-02 Jim Wilson <jimw (a] sifive.com>
3024
3025 PR ld/22756
3026 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3027 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3028 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3029 Pass new argument to riscv_relax_delete_bytes.
3030 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3031 ATTRIBUTE_UNUSED from link_info parameter.
3032
3033 2018-02-02 Alan Modra <amodra (a] gmail.com>
3034
3035 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3036 emitted for toc sequence optimization. Set and use "howto" later.
3037
3038 2018-02-01 Simon Marchi <simon.marchi (a] ericsson.com>
3039
3040 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3041 arithmetic on NULL pointer.
3042 * elflink.c (_bfd_elf_archive_symbol_lookup,
3043 elf_link_add_archive_symbols): Likewise.
3044
3045 2018-01-31 Michael Matz <matz (a] suse.de>
3046
3047 * elflink.c (bfd_elf_define_start_stop): Fix check of
3048 def_dynamic.
3049
3050 2018-01-31 H.J. Lu <hongjiu.lu (a] intel.com>
3051
3052 PR ld/21964
3053 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3054 __stop symbols are referenced by shared objects.
3055
3056 2018-01-30 Alan Modra <amodra (a] gmail.com>
3057
3058 PR 22758
3059 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3060 segment when demand paged with lma on the same page. Test this
3061 before load/non-load, executable/non-executable,
3062 writable/non-writable tests and simplify. Delete bogus relro
3063 condition in writable/non-writable test. Delete outdated
3064 comment. Formatting.
3065
3066 2018-01-30 Alan Modra <amodra (a] gmail.com>
3067
3068 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3069 symbols dynamic.
3070
3071 2018-01-29 Alan Modra <amodra (a] gmail.com>
3072
3073 PR 22741
3074 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3075 range before converting to a symbol table pointer.
3076
3077 2018-01-27 Nick Clifton <nickc (a] redhat.com>
3078
3079 * po/ru.po: Updated Russian translation.
3080
3081 2018-01-26 Alan Modra <amodra (a] gmail.com>
3082
3083 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3084 they are defined dynamically.
3085
3086 2018-01-26 Alan Modra <amodra (a] gmail.com>
3087
3088 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3089 .branch_lt changes size.
3090
3091 2018-01-25 Alan Modra <amodra (a] gmail.com>
3092
3093 PR 22746
3094 * elfcode.h (elf_object_p): Avoid integer overflow.
3095
3096 2018-01-25 Eric Botcazou <ebotcazou (a] adacore.com>
3097
3098 PR ld/22727
3099 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3100 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3101
3102 Revert
3103 2017-10-19 H.J. Lu <hongjiu.lu (a] intel.com>
3104
3105 PR ld/22263
3106 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3107 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3108 bfd_link_executable for TLS check.
3109 (_bfd_sparc_elf_check_relocs): Likewise.
3110 (allocate_dynrelocs): Likewise.
3111 (_bfd_sparc_elf_relocate_section): Likewise.
3112
3113 2018-01-24 Renlin Li <renlin.li (a] arm.com>
3114
3115 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3116 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3117 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3118 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3119 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3120 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3121 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3122
3123 2018-01-24 Renlin Li <renlin.li (a] arm.com>
3124
3125 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3126 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3127 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3128 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3129 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3130 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3131 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3132 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3133 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3134 * bfd-in2.h: Regenerate.
3135 * libbfd.h: Regenerate.
3136
3137 2018-01-23 Maciej W. Rozycki <macro (a] mips.com>
3138
3139 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3140 `mips_elf32_section_processing' comment reference.
3141
3142 2018-01-20 H.J. Lu <hongjiu.lu (a] intel.com>
3143
3144 PR ld/22721
3145 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3146 versioned __tls_get_addr symbol.
3147
3148 2018-01-19 Nick Clifton <nickc (a] redhat.com>
3149
3150 * po/fr.po: Updated French translation.
3151
3152 2018-01-18 Alan Modra <amodra (a] gmail.com>
3153
3154 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3155 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3156 (ppc64_elf_build_stubs): Likewise.
3157
3158 2018-01-17 Nick Clifton <nickc (a] redhat.com>
3159
3160 * po/ru.po: Updated Russian translation.
3161 * po/uk/po: Updated Ukranian translation.
3162
3163 2018-01-17 Alan Modra <amodra (a] gmail.com>
3164
3165 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3166
3167 2018-01-17 Alan Modra <amodra (a] gmail.com>
3168
3169 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3170 (CRSETEQ, BEQCTRM): Define.
3171 (is_nonpic_glink_stub): Don't check bctr.
3172 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3173 (ppc_elf_relax_section): Size speculation barrier.
3174 (output_bctr): New function.
3175 (write_glink_stub): Use output_bctr.
3176 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3177 (ppc_elf_finish_dynamic_symbol): Likewise.
3178 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3179 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3180 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3181 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3182 (size_global_entry_stubs): Handle speculation barrier sizing.
3183 (plt_stub_size): Likewise.
3184 (output_bctr): New function.
3185 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3186 barrier.
3187 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3188 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3189 (build_global_entry_stubs): Output speculation barrier.
3190 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3191 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3192
3193 2018-01-17 Alan Modra <amodra (a] gmail.com>
3194
3195 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3196 __tls_get_addr_opt, and alignment sizing.
3197 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3198 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3199 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3200 or 8 insns.
3201 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3202 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3203 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3204 by PLT reloc count.
3205 (write_glink_stub): Handle __tls_get_addr_opt stub.
3206 Pad out to size given by GLINK_ENTRY_SIZE.
3207 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3208 (ppc_elf_finish_dynamic_symbol): Likewise.
3209 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3210 insn array since so many need rewriting.
3211 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3212 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3213 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3214 nops. Adjust all uses.
3215 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3216 in glink_vma calculation.
3217 (struct ppc_link_hash_table): Add global_entry section pointer.
3218 (create_linkage_sections): Create separate section for global
3219 entry stubs.
3220 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3221 (size_global_entry_stubs): Handle sizing for aligned stubs.
3222 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3223 and don't stash end of glink branch table in rawsize.
3224 (ppc_build_one_stub): Rewrite stub size calculations.
3225 (build_global_entry_stubs): Use new section.
3226 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3227 Build lazy link stubs out to end of section. Build global entry
3228 stubs in new section.
3229
3230 2018-01-15 Nick Clifton <nickc (a] redhat.com>
3231
3232 * po/uk.po: Updated Ukranian translation.
3233
3234 2018-01-13 Nick Clifton <nickc (a] redhat.com>
3235
3236 * po/bfd.pot: Regenerated.
3237
3238 2018-01-13 Nick Clifton <nickc (a] redhat.com>
3239
3240 * version.m4: Bump version to 2.30.51
3241 * configure: Regenerate.
3242
3243 2018-01-13 Nick Clifton <nickc (a] redhat.com>
3244
3245 2.30 branch created.
3246
3247 2018-01-12 Jens Widell <jl (a] opera.com>
3248
3249 * elf.c (setup_group): Optimize search for group by remembering
3250 last found group and restarting search at that index.
3251 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3252
3253 2018-01-12 Gunther Nikl <gnikl (a] users.sourceforge.net>
3254
3255 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3256 bfd_link_common_skip_none in switch.
3257
3258 2018-01-12 Alan Modra <amodra (a] gmail.com>
3259
3260 PR ld/22649
3261 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3262 references on forced local symbols.
3263
3264 2018-01-12 Vlad Ivanov <vlad (a] ivanov.email>
3265
3266 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3267 .reginfo section has wrong size.
3268
3269 2018-01-11 H.J. Lu <hongjiu.lu (a] intel.com>
3270
3271 PR ld/22393
3272 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3273 separate code and read-only data LOAD segments, create a new
3274 LOAD segment if the previous section contains text and the
3275 current section doesn't or vice versa. Don't put a writable
3276 section in a read-only segment if there is a RELRO segment.
3277
3278 2018-01-11 H.J. Lu <hongjiu.lu (a] intel.com>
3279
3280 PR ld/22649
3281 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3282 references on forced local symbols.
3283
3284 2018-01-11 H.J. Lu <hongjiu.lu (a] intel.com>
3285
3286 PR ld/22677
3287 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3288 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3289
3290 2018-01-09 Kuan-Lin Chen <kuanlinchentw (a] gmail.com>
3291
3292 PR 22662
3293 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3294
3295 2018-01-03 John Baldwin <jhb (a] FreeBSD.org>
3296
3297 * elf.c (elfcore_grok_freebsd_note): Handle
3298 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3299 NT_FREEBSD_PROCSTAT_VMMAP.
3300
3301 2018-01-03 Alan Modra <amodra (a] gmail.com>
3302
3303 Update year range in copyright notice of all files.
3304
3305 For older changes see ChangeLog-2017
3306
3308 Copyright (C) 2018 Free Software Foundation, Inc.
3309
3310 Copying and distribution of this file, with or without modification,
3311 are permitted in any medium without royalty provided the copyright
3312 notice and this notice are preserved.
3313
3314 Local Variables:
3315 mode: change-log
3316 left-margin: 8
3317 fill-column: 74
3318 version-control: never
3319 End:
3320