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