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