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