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