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