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