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