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