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