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