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