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