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